Skip to content

Commit

Permalink
Make safer CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
Caerind committed Aug 19, 2024
1 parent 866b0e2 commit e538103
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ FetchContent_Declare(SFML
GIT_TAG 2.6.x)
FetchContent_MakeAvailable(SFML)

add_subdirectory(src)
if(EXISTS src)
add_subdirectory(src)
endif()

add_subdirectory(tests)
add_subdirectory(examples)
if(EXISTS tests)
add_subdirectory(tests)
endif()
if(EXISTS examples)
add_subdirectory(examples)
endif()

set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT 3DSceneExample)

0 comments on commit e538103

Please sign in to comment.