-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (21 loc) · 881 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.26)
set(CMAKE_C_COMPILER /usr/bin/clang)
project(Arnamsneat LANGUAGES C VERSION 1.0)
set(CMAKE_C_STANDARD 23)
add_compile_options("-Wall")
add_compile_options("-Wextra")
add_compile_options("-Wpedantic")
add_compile_options("-O3")
add_compile_options("-fvisibility=hidden")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options("-Wno-nullability-extension")
endif()
#add_link_options("-s")
file(GLOB SOURCES CONFIGURE_DEPENDS include/arnamsneat/*.h src/*.c src/*.h)
add_library(${PROJECT_NAME} SHARED ${SOURCES} ${INCLUDES})
target_link_libraries(${PROJECT_NAME} SDL2 SDL2_ttf SDL2_image)
target_include_directories(${PROJECT_NAME} PRIVATE include)
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
set(DEMO demo)
add_subdirectory(${DEMO})
file(COPY ${DEMO}/res DESTINATION ${CMAKE_BINARY_DIR}/demo)