stuff
This commit is contained in:
parent
2dbfa1b99e
commit
b1230534c5
22 changed files with 547 additions and 429 deletions
|
@ -22,23 +22,30 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) # Build static libraries by
|
|||
|
||||
include(FetchContent)
|
||||
|
||||
# Raylib 5.5
|
||||
FetchContent_Declare(
|
||||
raylib
|
||||
GIT_REPOSITORY https://github.com/raysan5/raylib.git
|
||||
GIT_TAG 5.5
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(raylib)
|
||||
# Raylib 5.5
|
||||
find_package(raylib 5.5)
|
||||
if(NOT raylib_FOUND)
|
||||
FetchContent_Declare(
|
||||
raylib
|
||||
GIT_REPOSITORY https://github.com/raysan5/raylib.git
|
||||
GIT_TAG 5.5
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(raylib)
|
||||
endif()
|
||||
|
||||
# Flecs
|
||||
FetchContent_Declare(
|
||||
flecs
|
||||
GIT_REPOSITORY https://github.com/SanderMertens/flecs.git
|
||||
GIT_TAG v4.0.4
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(flecs)
|
||||
find_package(flecs QUIET)
|
||||
if(NOT flecs_FOUND)
|
||||
FetchContent_Declare(
|
||||
flecs
|
||||
GIT_REPOSITORY https://github.com/SanderMertens/flecs.git
|
||||
GIT_TAG v4.0.4
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(flecs)
|
||||
endif()
|
||||
|
||||
## alyson engine (needs flecs and raylib)
|
||||
set(ASSETS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/assets/")
|
||||
|
@ -69,5 +76,10 @@ target_include_directories(colysis PUBLIC include
|
|||
# put the assets folder path as a C preprocessor define
|
||||
target_compile_definitions(colysis PRIVATE ASSETS_PATH="${ASSETS_PATH}")
|
||||
|
||||
put_targets_into_folder(FOLDER "vendor/raylib" TARGETS raylib uninstall)
|
||||
|
||||
# if the os is windows, add the uninstall target to the vendor/raylib folder
|
||||
if(WIN32)
|
||||
put_targets_into_folder(FOLDER "vendor/raylib" TARGETS uninstall)
|
||||
endif()
|
||||
put_targets_into_folder(FOLDER "vendor/raylib" TARGETS raylib)
|
||||
put_targets_into_folder(FOLDER "vendor/flecs" TARGETS flecs::flecs flecs::flecs_static)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue