forked from olofson/eel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (41 loc) · 1.84 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 2.8)
project(EEL)
option(BUILD_EELIUM "Build Eelium SDL/OpenGL/Audiality2 binding" ON)
set(EEL_HAVE_EELIUM ${BUILD_EELIUM})
option(BUILD_SHARED_LIBS "Build shared libraries." ON)
set(VERSION_MAJOR 0)
set(VERSION_MINOR 3)
set(VERSION_PATCH 7)
set(VERSION_BUILD 0)
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(PACKAGE "eel-${VERSION_STRING}")
install(DIRECTORY include/ DESTINATION include/EEL
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY src/modules/ DESTINATION lib/eel
FILES_MATCHING PATTERN "*.eel")
install(DIRECTORY src/modules/eelium/fonts DESTINATION lib/eel/eelium
FILES_MATCHING PATTERN "*.png")
install(DIRECTORY src/modules/eelium/tools/ DESTINATION lib/eel
FILES_MATCHING PATTERN "*.eel")
install(DIRECTORY tools/ DESTINATION lib/eel
FILES_MATCHING PATTERN "*.eel")
# Release build: full optimization, no debug features, no debug info
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
# Maintainer build: No optimizations, lots of warnings, fail on warnings
set(f "-O0 -g -Wall -Wwrite-strings -Wcast-align")
set(f "${f} -Wbad-function-cast -Waggregate-return")
set(f "${f} -Wstrict-prototypes -fno-builtin -Wshadow")
set(f "${f} -Wdeclaration-after-statement -Wmissing-prototypes")
set(f "${f} -Wmissing-declarations -Wdisabled-optimization")
set(CMAKE_C_FLAGS_MAINTAINER "${f} -Werror")
# Debug build: Maintainer + extra debug features, don't fail on warnings
set(f "${f} -DDEBUG")
set(CMAKE_C_FLAGS_DEBUG ${f})
# MXE again... Maybe find_package() only works on the top level in some cases?
find_package(PkgConfig)
add_subdirectory(src)
add_subdirectory(test)
set(EEL_AUTO_MESSAGE "This file is automatically generated. Do not edit!")
configure_file(eel.pc.cmake ${CMAKE_BINARY_DIR}/eel.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/eel.pc
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/")