Skip to content

Commit 433600e

Browse files
committed
Cmake tests
1 parent e538103 commit 433600e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

CMakeLists.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
1010
set(CMAKE_CXX_EXTENSIONS OFF)
1111

1212
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
13-
enable_testing()
13+
enable_testing()
1414
endif()
1515

1616
# Used to have a good display look in IDE
@@ -23,15 +23,15 @@ FetchContent_Declare(SFML
2323
GIT_TAG 2.6.x)
2424
FetchContent_MakeAvailable(SFML)
2525

26-
if(EXISTS src)
27-
add_subdirectory(src)
28-
endif()
26+
add_subdirectory(src)
2927

30-
if(EXISTS tests)
28+
if(EXISTS "${CMAKE_SOURCE_DIR}/tests")
3129
add_subdirectory(tests)
3230
endif()
33-
if(EXISTS examples)
31+
if(EXISTS "${CMAKE_SOURCE_DIR}/examples")
3432
add_subdirectory(examples)
3533
endif()
3634

37-
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT 3DSceneExample)
35+
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
36+
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT 3DSceneExample)
37+
endif()

0 commit comments

Comments
 (0)