diff --git a/CMakeLists.txt b/CMakeLists.txt index 108e113..c380a18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.14...3.19) # Note: update this to your new project's name and version project( Greeter - VERSION 1.0.1 + VERSION 1.0 LANGUAGES CXX ) @@ -58,8 +58,8 @@ set_target_properties(Greeter PROPERTIES SOVERSION 1 VERSION ${PROJECT_VERSION}) # being a cross-platform target, we enforce standards conformance on MSVC target_compile_options(Greeter PUBLIC "$<$:/permissive>") -# Link dependencies -target_link_libraries(Greeter PUBLIC fmt::fmt) +# Link dependencies, but Note: the fmt lib does not work with SHARED yet! CK +target_link_libraries(Greeter PUBLIC fmt::fmt-header-only) set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME}-${PROJECT_VERSION}) target_include_directories( @@ -80,8 +80,8 @@ include(GenerateExportHeader) generate_export_header( ${PROJECT_NAME} EXPORT_FILE_NAME PackageProjectInclude/${EXPORT_HEADER_LOCATION} ) -# Note: the export header will be installed while installing the version header! CK +# Note: the export header will be installed while installing the version header! CK packageProject( NAME ${PROJECT_NAME} VERSION ${PROJECT_VERSION} diff --git a/all/CMakeLists.txt b/all/CMakeLists.txt index c33aca3..0737fd5 100644 --- a/all/CMakeLists.txt +++ b/all/CMakeLists.txt @@ -12,4 +12,4 @@ enable_testing() add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../standalone standalone) add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../test test) -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../documentation documentation) \ No newline at end of file +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../documentation documentation) diff --git a/cmake/tools.cmake b/cmake/tools.cmake index a5d1f1f..e8067a6 100644 --- a/cmake/tools.cmake +++ b/cmake/tools.cmake @@ -7,8 +7,6 @@ if(NOT PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) endif() include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake) -CPMUsePackageLock(package-lock.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/options.cmake) # option: default not set diff --git a/standalone/CMakeLists.txt b/standalone/CMakeLists.txt index ad8223f..0286a62 100644 --- a/standalone/CMakeLists.txt +++ b/standalone/CMakeLists.txt @@ -11,6 +11,7 @@ include(../cmake/tools.cmake) include(../cmake/CPM.cmake) CPMUsePackageLock(package-lock.cmake) +option(CXXOPTS_BUILD_TESTS "Not needed!" OFF) CPMAddPackage("gh:jarro2783/cxxopts@2.2.0") CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ab4c4ff..82cfaa0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -42,7 +42,7 @@ file(GLOB sources CONFIGURE_DEPENDS source/*.cpp) add_executable(GreeterTests ${sources}) target_link_libraries(GreeterTests doctest::doctest Greeter::Greeter) -set_target_properties(GreeterTests PROPERTIES CXX_STANDARD 17) +set_target_properties(GreeterTests PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD}) # enable compiler warnings if(NOT TEST_INSTALLED_VERSION)