added CBLib and Raylib

master
cobrapitz 3 years ago
parent 28a2f25b23
commit 08b7da9426

@ -12,7 +12,7 @@
# )
if (NOT DEFINED BOOST_GIT_TAG)
message(FATAL_ERROR "BOOST_GIT_TAG is not defined.\n see https://github.com/boostorg/boost and grab a release tag.\n example: set(BOOST_GIT_TAG boost-1.81.0)")
message(FATAL_ERROR "BOOST_GIT_TAG is not defined.\n see https://github.com/boostorg/boost and grab a release tag.\n example: set(BOOST_GIT_TAG boost-1.82.0)")
endif()
if (NOT DEFINED BOOST_INCLUDE_LIBRARIES)

@ -0,0 +1,17 @@
# usage:
# FetchContent_MakeAvailable(cblib)
# target_link_libraries(${PROJECT_NAME} PRIVATE cblib)
if (NOT DEFINED CBLIB_GIT_TAG)
message(FATAL_ERROR "CBLIB_GIT_TAG is not defined.\n see https://git.cobrapitz.de/cobrapitz/CBLib and grab a release tag.\n example: set(CBLIB_GIT_TAG v0.1.4)")
endif()
FetchContent_Declare(
cblib
GIT_REPOSITORY https://git.cobrapitz.de/cobrapitz/CBLib.git
GIT_TAG ${CBLIB_GIT_TAG}
)
include(${CMAKE_SOURCE_DIR}/cmake/Utils.cmake)
print_git_tag(${CBLIB_GIT_TAG})

@ -0,0 +1,31 @@
# 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})

@ -7,5 +7,5 @@ macro(print_git_tag GIT_TAG)
get_filename_component(_CURRENT_FILENAME ${CMAKE_CURRENT_LIST_FILE} NAME)
# print message
message(STATUS "${_CURRENT_FILENAME}:> Fetching Version-[${GIT_TAG}]")
message(STATUS "FETCH: ${_CURRENT_FILENAME}:> Fetching Version-[${GIT_TAG}]")
endmacro()

Loading…
Cancel
Save