File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed
Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -21,5 +21,4 @@ target_include_directories(vfspp
2121 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /vendor/miniz-cpp>
2222)
2323
24- # Link the dependency
25- # target_link_libraries(vfspp INTERFACE miniz-cpp)
24+ target_compile_features (vfspp INTERFACE cxx_std_17)
Original file line number Diff line number Diff line change @@ -84,13 +84,10 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/vendor/vfspp vfspp_build)
8484```
8585- For MSVC specify setting flag to use C++17
8686``` cmake
87- if(MSVC)
88- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
89- endif(MSVC)
90- ```
91- - Add vfspp as dependency to your target
87+ - Add vfspp as dependency to your target and set C++17 standard
9288```cmake
93- target_link_libraries(vfsppexample PRIVATE vfspp)
89+ target_link_libraries(<your_project> PRIVATE vfspp)
90+ target_compile_features(<your_project> PRIVATE cxx_std_17)
9491```
9592
9693See examples/CMakeLists.txt for example of usage
Original file line number Diff line number Diff line change @@ -6,8 +6,5 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/.. vfspp_build)
66
77add_executable (vfsppexample example.cpp)
88
9- if (MSVC )
10- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17" )
11- endif (MSVC )
12-
139target_link_libraries (vfsppexample PRIVATE vfspp)
10+ target_compile_features (vfsppexample PRIVATE cxx_std_17)
You can’t perform that action at this time.
0 commit comments