2024-11-26 23:13:11 +00:00
|
|
|
cmake_minimum_required(VERSION 3.27)
|
2024-08-23 04:05:23 +00:00
|
|
|
project(clay_examples_raylib_sidebar_scrolling_container C)
|
2024-09-28 23:53:46 +00:00
|
|
|
set(CMAKE_C_STANDARD 99)
|
2024-08-23 04:05:23 +00:00
|
|
|
|
|
|
|
# Adding Raylib
|
|
|
|
include(FetchContent)
|
|
|
|
set(FETCHCONTENT_QUIET FALSE)
|
|
|
|
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples
|
|
|
|
set(BUILD_GAMES OFF CACHE BOOL "" FORCE) # don't build the supplied example games
|
|
|
|
|
|
|
|
FetchContent_Declare(
|
|
|
|
raylib
|
|
|
|
GIT_REPOSITORY "https://github.com/raysan5/raylib.git"
|
|
|
|
GIT_TAG "master"
|
|
|
|
GIT_PROGRESS TRUE
|
2024-09-22 01:27:29 +00:00
|
|
|
GIT_SHALLOW TRUE
|
2024-08-23 04:05:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
FetchContent_MakeAvailable(raylib)
|
|
|
|
|
2024-09-28 03:43:29 +00:00
|
|
|
add_executable(clay_examples_raylib_sidebar_scrolling_container main.c multi-compilation-unit.c)
|
2024-08-23 04:05:23 +00:00
|
|
|
|
2024-11-26 23:13:11 +00:00
|
|
|
target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC)
|
2024-08-23 04:05:23 +00:00
|
|
|
target_include_directories(clay_examples_raylib_sidebar_scrolling_container PUBLIC .)
|
|
|
|
|
|
|
|
target_link_libraries(clay_examples_raylib_sidebar_scrolling_container PUBLIC raylib)
|
2024-12-30 00:28:24 +00:00
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS_DEBUG "-Wall -Werror -Wno-error=missing-braces -DCLAY_DEBUG")
|
|
|
|
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
2024-08-23 04:05:23 +00:00
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
TARGET clay_examples_raylib_sidebar_scrolling_container POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resources
|
2024-12-30 00:09:14 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/resources)
|