File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,12 @@ project (raylib-cpp
77 LANGUAGES C CXX)
88
99# Options
10- option (BUILD_RAYLIB_CPP_EXAMPLES "Examples" ON )
10+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
11+ set (BUILD_RAYLIB_CPP_EXAMPLES_DEFAULT TRUE )
12+ else ()
13+ set (BUILD_RAYLIB_CPP_EXAMPLES_DEFAULT FALSE )
14+ endif ()
15+ option (BUILD_RAYLIB_CPP_EXAMPLES "Examples" ${BUILD_RAYLIB_CPP_EXAMPLES_DEFAULT} )
1116
1217# Include Directory
1318add_subdirectory (include )
@@ -16,14 +21,14 @@ add_subdirectory(include)
1621if (BUILD_RAYLIB_CPP_EXAMPLES)
1722 add_subdirectory (examples)
1823 set (BUILD_RAYLIB_CPP_STATIC ON )
19- endif ()
2024
21- # Testing
22- include (CTest)
23- enable_testing ()
24- if (BUILD_TESTING AND BUILD_RAYLIB_CPP_EXAMPLES)
25- set (CTEST_CUSTOM_TESTS_IGNORE
26- pkg-config--static
27- )
28- add_subdirectory (tests)
25+ # Testing
26+ include (CTest)
27+ enable_testing ()
28+ if (BUILD_TESTING)
29+ set (CTEST_CUSTOM_TESTS_IGNORE
30+ pkg-config--static
31+ )
32+ add_subdirectory (tests)
33+ endif ()
2934endif ()
You can’t perform that action at this time.
0 commit comments