-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (49 loc) · 2.12 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 3.10.0)
PROJECT("803 Emulator" C)
ADD_EXECUTABLE(803 Main.c Keyboard.c Hands.c Contactor.c Charger.c PowerCabinet.c Sound.c
Cpu.c HoursRun.c Emulate.c PTS.c Plotter.c Wiring.c Common.c E803ops.c Logging.c fsm.c )
SET(CMAKE_C_FLAGS "-std=gnu99 -g -Wall -Wextra -Wunused -Wconversion"
"-Wundef -Wcast-qual -Wmissing-prototypes "
"-Wredundant-decls -Wunreachable-code -Wwrite-strings -Warray-bounds"
"-Wstrict-aliasing=3 -Wstrict-overflow=1 -Wstrict-prototypes -Winline"
"-Wshadow -Wswitch -Wmissing-include-dirs -Woverlength-strings -Wpacked"
"-Wdisabled-optimization -Wformat=2 -Winit-self"
"-Wunused-parameter -Wlogical-op -Wuninitialized"
"-Wnested-externs -Wpointer-arith -Wdouble-promotion -Wunused-macros"
"-Wunsafe-loop-optimizations -rdynamic ")
# -fdiagnostics-color")
STRING(REGEX REPLACE ";" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
find_package( PkgConfig REQUIRED)
pkg_check_modules ( GLIB REQUIRED glib-2.0 )
include_directories(${GLIB_INCLUDE_DIRS})
set(LIBS ${LIBS} ${GLIB_LIBRARIES})
pkg_check_modules ( GDK REQUIRED gdk-3.0 )
include_directories(${GDK_INCLUDE_DIRS})
set(LIBS ${LIBS} ${GDK_LIBRARIES})
#pkg_check_modules ( XMU REQUIRED xmu )
#include_directories(${XMU_INCLUDE_DIRS})
#set(LIBS ${LIBS} ${XMU_LIBRARIES})
pkg_check_modules ( GTK REQUIRED gtk+-3.0 )
include_directories(${GTK_INCLUDE_DIRS})
set(LIBS ${LIBS} ${GTK_LIBRARIES})
pkg_check_modules ( ALSA REQUIRED alsa )
include_directories(${ALSA_INCLUDE_DIRS})
set(LIBS ${LIBS} ${ALSA_LIBRARIES})
#pkg_check_modules ( FT2 REQUIRED freetype2 )
#include_directories(${FT2_INCLUDE_DIRS})
#set(LIBS ${LIBS} ${FT2_LIBRARIES})
target_link_libraries(803 ${LIBS} -liberty -lm )
#add_custom_target(
# Tarballs ALL
# DEPENDS 803-Emulator.tgz
#)
#add_custom_command ( OUTPUT 803-Emulator.tgz
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/createTarballs.sh
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
# DEPENDS 803-Emulator)
# THis is used to detect if the emulator is being run from witin the
# build tree and then to choose where to get resources from .
configure_file(
${CMAKE_SOURCE_DIR}/config.h.in
${CMAKE_BINARY_DIR}/config.h
)