aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-09-11 18:39:13 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-09-11 18:39:13 +0900
commit473686bf953aa8726c7b747935d260be5d9f8ba1 (patch)
tree4d02800d8f1c5a5e262a3d003fffb95ae36896dc
parent3b6959ab8ca5cd8d55c2e4627eb9a61dfb2506ff (diff)
downloadlibquotient-473686bf953aa8726c7b747935d260be5d9f8ba1.tar.gz
libquotient-473686bf953aa8726c7b747935d260be5d9f8ba1.zip
CMakeLists.txt: use set_target_properties(); specify C++ std per-target
-rw-r--r--CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1bc49868..951ef8c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,8 +37,6 @@ if (NOT CMAKE_INSTALL_INCLUDEDIR)
set(CMAKE_INSTALL_INCLUDEDIR "include")
endif()
-set(CMAKE_CXX_STANDARD 17)
-
if (MSVC)
add_compile_options(/EHsc /W4
/wd4100 /wd4127 /wd4242 /wd4244 /wd4245 /wd4267 /wd4365 /wd4456 /wd4459
@@ -223,10 +221,12 @@ endif()
set(example_SRCS examples/qmc-example.cpp)
add_library(${PROJECT_NAME} ${lib_SRCS} ${api_SRCS})
-set_property(TARGET ${PROJECT_NAME} PROPERTY VERSION "${PROJECT_VERSION}")
-set_property(TARGET ${PROJECT_NAME} PROPERTY SOVERSION ${API_VERSION} )
-set_property(TARGET ${PROJECT_NAME} PROPERTY
- INTERFACE_${PROJECT_NAME}_MAJOR_VERSION ${API_VERSION})
+set_target_properties(${PROJECT_NAME} PROPERTIES
+ VERSION "${PROJECT_VERSION}"
+ SOVERSION ${API_VERSION}
+ INTERFACE_${PROJECT_NAME}_MAJOR_VERSION ${API_VERSION}
+ CXX_STANDARD 17
+)
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY
COMPATIBLE_INTERFACE_STRING ${PROJECT_NAME}_MAJOR_VERSION)