From fa8420e41054d74ebcb26ca904defea0dedec31c Mon Sep 17 00:00:00 2001 From: Quentin Bazin Date: Thu, 23 Jan 2020 14:27:31 +0900 Subject: [PATCH] [CMakeLists.txt] Small fix. --- client/CMakeLists.txt | 6 +++++- common/CMakeLists.txt | 6 +++++- server/CMakeLists.txt | 8 ++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 918ffb24..e0cbba8b 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -39,7 +39,11 @@ if(MINGW) target_link_options(${CMAKE_PROJECT_NAME} PRIVATE -static-libstdc++ -static-libgcc -mconsole) endif() -set(CMAKE_CXX_STANDARD 14) +if(MSVC) + set(CMAKE_CXX_STANDARD 14) +else() + target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -std=c++14) +endif() # target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -pg) # target_link_options(${CMAKE_PROJECT_NAME} PRIVATE -pg) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 1048cba2..c9c11727 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -34,7 +34,11 @@ target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -DSOL_CHECK_ARGUMENT -DSOL_PRINT_ERRORS=1 ) -set(CMAKE_CXX_STANDARD 14) +if(MSVC) + set(CMAKE_CXX_STANDARD 14) +else() + target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -std=c++14) +endif() # target_compile_options(${CMAKE_PROJECT_NAME}_common PRIVATE -pg) diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 96e8e270..3fb671d8 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -39,7 +39,11 @@ if(MINGW) target_link_options(${CMAKE_PROJECT_NAME}_server PRIVATE -static-libstdc++ -static-libgcc -mconsole) endif() -set(CMAKE_CXX_STANDARD 14) +if(MSVC) + set(CMAKE_CXX_STANDARD 14) +else() + target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -std=c++14) +endif() # target_compile_options(${CMAKE_PROJECT_NAME}_server PRIVATE -pg) # target_link_options(${CMAKE_PROJECT_NAME}_server PRIVATE -pg) @@ -59,7 +63,7 @@ target_link_libraries(${CMAKE_PROJECT_NAME}_server ${SDL2_MIXER_LIBRARIES} ${SDL2_TTF_LIBRARIES} ${TINYXML2_LIBRARIES} - ${GLEW_LIBRARIES} + ${GLEW_LIBRARIES} ${LUA_LIBRARIES} sfml-system sfml-network