@@ -23,6 +23,7 @@ include(FetchContent)
2323FetchContent_Declare(
2424 googletest
2525 URL https://github.com/google/googletest/archive/refs/heads/main.zip
26+ DOWNLOAD_EXTRACT_TIMESTAMP true
2627)
2728# For Windows: Prevent overriding the parent project's compiler/linker settings
2829set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
@@ -41,28 +42,28 @@ endif()
4142
4243option (ENABLE_EXAMPLE "Enable Example" OFF )
4344
44- if (ENABLE_TEST )
45+ if (ENABLE_EXAMPLE )
4546add_executable (basic examples/basic.cpp)
4647target_include_directories (basic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
47- target_link_libraries (basic PUBLIC CXXStateTree)
48+ target_link_libraries (basic PRIVATE CXXStateTree)
4849
4950add_executable (nested examples/nested.cpp)
5051target_include_directories (basic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
51- target_link_libraries (nested PUBLIC CXXStateTree)
52+ target_link_libraries (nested PRIVATE CXXStateTree)
5253
5354add_executable (export_dot_example examples/export_dot.cpp)
5455target_include_directories (export_dot_example PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
55- target_link_libraries (export_dot_example PUBLIC CXXStateTree)
56+ target_link_libraries (export_dot_example PRIVATE CXXStateTree)
5657add_executable (export_dot_nested_example examples/export_dot_nested.cpp)
5758target_include_directories (export_dot_nested_example PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
58- target_link_libraries (export_dot_nested_example PUBLIC CXXStateTree)
59+ target_link_libraries (export_dot_nested_example PRIVATE CXXStateTree)
5960add_executable (export_dot_context_example examples/export_dot_context.cpp)
6061target_include_directories (export_dot_context_example PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
61- target_link_libraries (export_dot_context_example PUBLIC CXXStateTree)
62+ target_link_libraries (export_dot_context_example PRIVATE CXXStateTree)
6263
6364add_executable (context_example examples/context_example.cpp)
6465target_include_directories (context_example PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /include )
65- target_link_libraries (context_example PUBLIC CXXStateTree)
66+ target_link_libraries (context_example PRIVATE CXXStateTree)
6667
6768endif ()
6869
@@ -112,6 +113,7 @@ if(ENABLE_SINGLE_HEADER)
112113 FetchContent_Declare(
113114 googletest
114115 URL https://github.com/google/googletest/archive/refs/heads/main.zip
116+ DOWNLOAD_EXTRACT_TIMESTAMP true
115117 )
116118 # For Windows: Prevent overriding the parent project's compiler/linker settings
117119 set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
0 commit comments