You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
CMake
32 lines
1.0 KiB
CMake
# usage:
|
|
# FetchContent_MakeAvailable(raylib)
|
|
# target_link_libraries(${PROJECT_NAME} PRIVATE raylib)
|
|
|
|
##################### after target_link_libraries
|
|
## Web Configurations
|
|
#if (${PLATFORM} STREQUAL "Web")
|
|
# # Tell Emscripten to build an example.html file.
|
|
# set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".html")
|
|
#endif()
|
|
#
|
|
## Checks if OSX and links appropriate frameworks (Only required on MacOS)
|
|
#if (APPLE)
|
|
# target_link_libraries(${PROJECT_NAME} "-framework IOKit")
|
|
# target_link_libraries(${PROJECT_NAME} "-framework Cocoa")
|
|
# target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
|
|
#endif()
|
|
|
|
|
|
if (NOT DEFINED RAYLIB_GIT_TAG)
|
|
message(FATAL_ERROR "RAYLIB_GIT_TAG is not defined.\n see https://github.com/raysan5/raylib and grab a release tag.\n example: set(RAYLIB_GIT_TAG 4.5.0)")
|
|
endif()
|
|
|
|
FetchContent_Declare(
|
|
raylib
|
|
GIT_REPOSITORY https://github.com/raysan5/raylib.git
|
|
GIT_TAG ${RAYLIB_GIT_TAG}
|
|
)
|
|
|
|
include(${CMAKE_SOURCE_DIR}/cmake/Utils.cmake)
|
|
print_git_tag(${RAYLIB_GIT_TAG})
|