diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 7243ce8..ff09dc8 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -14,13 +14,6 @@ target_link_libraries( rectpack2D::rectpack2D ) -# Set C++ standard to 17 -set_property( - TARGET rectpack2D-example - PROPERTY - CXX_STANDARD 17 -) - set(RESULT_EXE_WORKING_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # Enable LTO (only in release, not debug with sanitizers) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d8c90e6..40fee8b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,13 @@ add_library(rectpack2D INTERFACE) +target_compile_features( + rectpack2D + INTERFACE + cxx_std_17 +) + target_include_directories( rectpack2D INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/ -) \ No newline at end of file +)