blob: ca9b11bea6341d6a3c4e3c46d839a233f5230b76 (
plain) (
blame)
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
70
71
72
73
74
75
76
77
78
79
80
81
|
# $URL$
# $Id$
add_subdirectory(lib)
##
# CONFIGURATION
##
pascal_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in
${CMAKE_CURRENT_BINARY_DIR}/config-${FPC_PLATFORM}.inc)
# write path to shared data to paths.inc
if(UNIX AND NOT APPLE)
if(IS_ABSOLUTE ${DATADIR})
set(usdx_install_datadir "${DATADIR}")
else()
set(usdx_install_datadir "${CMAKE_INSTALL_PREFIX}/${DATADIR}")
endif()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/paths.inc
"INSTALL_DATADIR = '${usdx_install_datadir}';")
endif()
##
# BUILD
##
# includes used by ultrastardx
set(usdx_includes
${CMAKE_CURRENT_BINARY_DIR}/config-${FPC_PLATFORM}.inc
)
if(UNIX AND NOT APPLE)
list(APPEND usdx_includes ${CMAKE_CURRENT_BINARY_DIR}/paths.inc)
endif()
# packages by ultrastardx
set(usdx_packages
collections
ffmpeg
fft
freetype
sdl
sdl_image
opengl
portaudio
portmixer
projectm
png
samplerate
sqlite3
zlib
)
if(WIN32)
list(APPEND usdx_packages bass midi)
endif(WIN32)
#if(DELPHI)
# list(APPEND usdx_packages ctypes)
#endif(DELPHI)
# dependencies by ultrastardx
set(usdx_depends)
if(libprojectM_USE_CWRAPPER)
list(APPEND usdx_depends projectM-cwrapper)
endif()
# add target for ultrastardx binary
pascal_add_module(ultrastardx ultrastardx.dpr
#FPC_FLAGS -Si -Cs2000000 # maybe set stack size?
OUTPUT_DIR ${USDX_GAME_DIR}
UNITS
base/*.pas
macosx/*.pas
media/*.pas
menu/*.pas
screens/*.pas
lua/*.pas
lib/other/*.pas
INCLUDES ${usdx_includes}
PACKAGES ${usdx_packages}
DEPENDS ${usdx_depends}
)
|