File tree Expand file tree Collapse file tree 2 files changed +521
-15
lines changed Expand file tree Collapse file tree 2 files changed +521
-15
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,12 @@ target_include_directories(${lib_name} INTERFACE
6363 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include > # Path during build
6464 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} > # Path after installation
6565)
66+ target_compile_definitions (${lib_name} PUBLIC cxx_std_20=1) # Ensure C++20 is used
6667
6768# Dynamic library configuration (optional)
6869# Configure additional properties when building as a shared library
6970if (BUILD_SHARED_LIBS )
70- set_target_properties (${PROJECT_NAME } PROPERTIES
71+ set_target_properties (${lib_name } PROPERTIES
7172 WINDOWS_EXPORT_ALL_SYMBOLS ON # Export all symbols on Windows (no explicit __declspec needed)
7273 VERSION ${PROJECT_VERSION} # Set the library version (used for .so.x.y.z on Linux)
7374 SOVERSION ${PROJECT_VERSION_MAJOR} # Set the ABI version (used for .so.x on Linux)
@@ -125,8 +126,6 @@ install(FILES
125126# Testing configuration (optional)
126127# Enable testing support
127128if (MYSVAC_JSONLIB_ENABLE_TEST)
128- set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
129- set (CMAKE_CXX_STANDARD 23)
130129 if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /test /CMakeLists.txt)
131130 enable_testing () # Enable CTest integration
132131 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /test ) # Add test subdirectory
You can’t perform that action at this time.
0 commit comments