cmake_minimum_required(VERSION 3.20) project(colysis LANGUAGES C CXX VERSION 0.0.1 ) # Set C/C++ standards set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) # Set compiler flags set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Generate compile commands (useful for IDEs) set(USE_FOLDERS ON) # Organize targets into folders (for IDEs) set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) # Build static libraries by default include(FetchContent) # Raylib 5.5 FetchContent_Declare( raylib GIT_REPOSITORY https://github.com/raysan5/raylib.git GIT_TAG 5.5 ) FetchContent_MakeAvailable(raylib) # Flecs FetchContent_Declare( flecs GIT_REPOSITORY https://github.com/SanderMertens/flecs.git GIT_TAG v4.0.4 ) FetchContent_MakeAvailable(flecs) ## alyson engine (needs flecs and raylib) set(ASSETS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/assets/") add_subdirectory(alyson) ## Colysis .game include(cmake/utils.cmake) # Get files in src/ and add them to the executable find_files(colysis_src src cpp hpp cxx hxx c h) add_executable(colysis ${colysis_src} ) target_link_libraries(colysis raylib flecs::flecs_static alyson ) target_include_directories(colysis PUBLIC include #${ALYSON_INCLUDE_DIR} ) # put the assets folder path as a C preprocessor define target_compile_definitions(colysis PRIVATE ASSETS_PATH="${ASSETS_PATH}") put_targets_into_folder(FOLDER "thid_party" TARGETS raylib flecs::flecs_static)