File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
22
33# Project name and version
44project (vfspp VERSION 1.0 LANGUAGES CXX)
5-
5+ option (BUILD_EXAMPLES "Build examples" OFF )
66# Add the miniz-cpp library
77add_subdirectory (vendor/miniz-cpp EXCLUDE_FROM_ALL )
88
@@ -13,6 +13,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
1313
1414# Add the include directory as a target
1515add_library (vfspp INTERFACE )
16+ add_library (vfspp::vfspp ALIAS vfspp)
1617
1718target_include_directories (vfspp
1819 INTERFACE
@@ -21,4 +22,8 @@ target_include_directories(vfspp
2122 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /vendor/miniz-cpp>
2223)
2324
24- target_compile_features (vfspp INTERFACE cxx_std_17)
25+ target_compile_features (vfspp INTERFACE cxx_std_17)
26+
27+ if (BUILD_EXAMPLES)
28+ add_subdirectory (examples)
29+ endif ()
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.10)
22
33project (vfsppexample)
44
5- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /.. vfspp_build)
5+ # add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/.. vfspp_build)
66
77add_executable (vfsppexample example.cpp)
88
99add_compile_definitions (VFSPP_ENABLE_MULTITHREADING)
1010
11- target_link_libraries (vfsppexample PRIVATE vfspp)
11+ target_link_libraries (vfsppexample PRIVATE vfspp::vfspp )
1212target_compile_features (vfsppexample PRIVATE cxx_std_17)
1313
1414# Specify the output directory
You can’t perform that action at this time.
0 commit comments