mirror of
https://gitlab.com/raylibtemplates/rt.git
synced 2026-06-28 03:06:18 -04:00
Remove CPP dependencies from CMakeLists.txt
This commit is contained in:
@@ -21,22 +21,6 @@ if(NOT raylib_FOUND) # If there's none, fetch and build raylib
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(RAYLIB_CPP_VERSION "v5.5.0")
|
|
||||||
find_package(raylib_cpp QUIET) # QUIET or REQUIRED
|
|
||||||
if(NOT raylib_cpp_FOUND) # If there's none, fetch and build raylib
|
|
||||||
include(FetchContent)
|
|
||||||
FetchContent_Declare(
|
|
||||||
raylib_cpp
|
|
||||||
DOWNLOAD_EXTRACT_TIMESTAMP OFF
|
|
||||||
URL https://github.com/RobLoach/raylib-cpp/archive/refs/tags/${RAYLIB_CPP_VERSION}.tar.gz
|
|
||||||
)
|
|
||||||
FetchContent_GetProperties(raylib_cpp)
|
|
||||||
if(NOT raylib_cpp_POPULATED) # Have we downloaded raylib yet?
|
|
||||||
set(FETCHCONTENT_QUIET NO)
|
|
||||||
FetchContent_MakeAvailable(raylib_cpp)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Our Project
|
# Our Project
|
||||||
add_executable(${PROJECT_NAME})
|
add_executable(${PROJECT_NAME})
|
||||||
|
|
||||||
@@ -85,11 +69,10 @@ target_sources(${PROJECT_NAME} PRIVATE ${GENERATED_HEADERS})
|
|||||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||||
${DATA_DIR}
|
${DATA_DIR}
|
||||||
${raylib_INCLUDE_DIRS}
|
${raylib_INCLUDE_DIRS}
|
||||||
${raylib_cpp_INCLUDE_DIRS}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Link libraries
|
# Link libraries
|
||||||
target_link_libraries(${PROJECT_NAME} raylib raylib_cpp)
|
target_link_libraries(${PROJECT_NAME} raylib)
|
||||||
|
|
||||||
# Web Configurations
|
# Web Configurations
|
||||||
if(${PLATFORM} STREQUAL "Web")
|
if(${PLATFORM} STREQUAL "Web")
|
||||||
|
|||||||
Reference in New Issue
Block a user