-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
41 lines (35 loc) · 1.2 KB
/
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
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.13)
project(exdevgfx-base)
# some helper
function(StripTargetExdev TARGET_NAME)
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
if (APPLE)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${TARGET_NAME}>
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "stripping target ${TARGET_NAME}"
)
else ()
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $<TARGET_FILE:${TARGET_NAME}>
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "stripping target ${TARGET_NAME}"
)
endif ()
endif ()
endfunction()
set(CMAKE_C_STANDARD 99)
add_compile_options(-Wall -Wextra -Werror -Wno-pointer-sign)
if(MORPHOS)
message(STATUS "Compiling for MorphOs")
elseif (AMIGAOS)
message(STATUS "Compiling for AmigaOs")
else()
message(STATUS "Compiling for any Os")
endif ()
add_subdirectory(library)
add_subdirectory(examples)
add_subdirectory(tools)
install(DIRECTORY assets
DESTINATION share/exdev
)