Skip to content

Commit 2f0a2f9

Browse files
committed
cmake: Clean up the CMake template
1 parent cce4792 commit 2f0a2f9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

projects/CMake/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ if (NOT raylib_cpp_FOUND)
2727
include(FetchContent)
2828
FetchContent_Declare(
2929
raylib_cpp
30-
URL https://github.com/RobLoach/raylib-cpp/archive/master.tar.gz
30+
GIT_REPOSITORY https://github.com/RobLoach/raylib-cpp.git
31+
GIT_TAG v4.0.4
3132
)
3233
FetchContent_GetProperties(raylib_cpp)
3334
if (NOT raylib_cpp_POPULATED) # Have we downloaded raylib-cpp yet?
3435
set(FETCHCONTENT_QUIET NO)
3536
FetchContent_Populate(raylib_cpp)
36-
set(BUILD_RAYLIB_CPP_EXAMPLES OFF CACHE BOOL "" FORCE)
37-
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
3837
add_subdirectory(${raylib_cpp_SOURCE_DIR} ${raylib_cpp_BINARY_DIR})
3938
endif()
4039
endif()
@@ -43,8 +42,7 @@ endif()
4342
set(PROJECT_NAME raylib_cpp_example)
4443
set(PROJECT_SOURCES main.cpp)
4544
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES})
46-
set(raylib_VERBOSE 1)
47-
set_property(${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
45+
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11)
4846
target_link_libraries(${PROJECT_NAME} PUBLIC raylib raylib_cpp)
4947

5048
# That's it! You should have an example executable that you can run. Have fun!

0 commit comments

Comments
 (0)