Mercurial > hg > orthanc-stone
annotate OrthancStone/Resources/CMake/SdlConfiguration.cmake @ 2101:517ef20aef74
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 14 Nov 2023 11:44:46 +0100 |
parents | 07964689cb0b |
children | f8f80e432abc |
rev | line source |
---|---|
1900 | 1 # Stone of Orthanc |
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
3 # Department, University Hospital of Liege, Belgium | |
2077
07964689cb0b
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1901
diff
changeset
|
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium |
07964689cb0b
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1901
diff
changeset
|
5 # Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1900 | 6 # |
7 # This program is free software: you can redistribute it and/or | |
8 # modify it under the terms of the GNU Lesser General Public License | |
9 # as published by the Free Software Foundation, either version 3 of | |
10 # the License, or (at your option) any later version. | |
11 # | |
12 # This program is distributed in the hope that it will be useful, but | |
13 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 # Lesser General Public License for more details. | |
16 # | |
17 # You should have received a copy of the GNU Lesser General Public | |
18 # License along with this program. If not, see | |
19 # <http://www.gnu.org/licenses/>. | |
20 | |
1899
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
21 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
22 if (STATIC_BUILD OR NOT USE_SYSTEM_SDL) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
23 SET(SDL_SOURCES_DIR ${CMAKE_BINARY_DIR}/SDL2-2.0.4) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
24 SET(SDL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/SDL2-2.0.4.tar.gz") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
25 SET(SDL_MD5 "44fc4a023349933e7f5d7a582f7b886e") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
26 DownloadPackage(${SDL_MD5} ${SDL_URL} "${SDL_SOURCES_DIR}") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
27 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
28 include_directories(${SDL_SOURCES_DIR}/include) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
29 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
30 set(TMP "${SDL_SOURCES_DIR}/include/SDL_config_premake.h") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
31 if (NOT EXISTS "${TMP}") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
32 file(WRITE "${TMP}" " |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
33 #include \"SDL_platform.h\" |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
34 #define HAVE_STDARG_H 1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
35 #define HAVE_STDDEF_H 1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
36 #define HAVE_STDINT_H 1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
37 ") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
38 endif() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
39 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
40 # General source files |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
41 file(GLOB SDL_SOURCES |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
42 ${SDL_SOURCES_DIR}/src/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
43 ${SDL_SOURCES_DIR}/src/atomic/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
44 ${SDL_SOURCES_DIR}/src/audio/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
45 ${SDL_SOURCES_DIR}/src/cpuinfo/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
46 ${SDL_SOURCES_DIR}/src/dynapi/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
47 ${SDL_SOURCES_DIR}/src/events/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
48 ${SDL_SOURCES_DIR}/src/file/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
49 ${SDL_SOURCES_DIR}/src/haptic/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
50 ${SDL_SOURCES_DIR}/src/joystick/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
51 ${SDL_SOURCES_DIR}/src/libm/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
52 ${SDL_SOURCES_DIR}/src/power/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
53 ${SDL_SOURCES_DIR}/src/render/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
54 ${SDL_SOURCES_DIR}/src/stdlib/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
55 ${SDL_SOURCES_DIR}/src/thread/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
56 ${SDL_SOURCES_DIR}/src/timer/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
57 ${SDL_SOURCES_DIR}/src/video/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
58 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
59 ${SDL_SOURCES_DIR}/src/loadso/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
60 #${SDL_SOURCES_DIR}/src/timer/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
61 ${SDL_SOURCES_DIR}/src/audio/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
62 ${SDL_SOURCES_DIR}/src/filesystem/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
63 ${SDL_SOURCES_DIR}/src/haptic/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
64 ${SDL_SOURCES_DIR}/src/joystick/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
65 #${SDL_SOURCES_DIR}/src/main/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
66 ${SDL_SOURCES_DIR}/src/video/dummy/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
67 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
68 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
69 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
70 -DUSING_PREMAKE_CONFIG_H=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
71 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
72 -DSDL_AUDIO_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
73 -DSDL_AUDIO_DRIVER_DUMMY=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
74 -DSDL_FILESYSTEM_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
75 -DSDL_FILESYSTEM_DUMMY=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
76 -DSDL_FILE_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
77 -DSDL_HAPTIC_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
78 -DSDL_JOYSTICK_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
79 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
80 #-DSDL_THREADS_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
81 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
82 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
83 if (CMAKE_SYSTEM_NAME STREQUAL "Linux") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
84 file(GLOB TMP |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
85 ${SDL_SOURCES_DIR}/src/core/linux/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
86 ${SDL_SOURCES_DIR}/src/loadso/dlopen/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
87 ${SDL_SOURCES_DIR}/src/render/software/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
88 ${SDL_SOURCES_DIR}/src/thread/pthread/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
89 ${SDL_SOURCES_DIR}/src/timer/unix/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
90 ${SDL_SOURCES_DIR}/src/video/x11/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
91 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
92 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
93 list(APPEND SDL_SOURCES ${TMP}) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
94 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
95 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
96 -DSDL_LOADSO_DLOPEN=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
97 -DSDL_THREAD_PTHREAD=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
98 -DSDL_TIMER_UNIX=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
99 -DSDL_POWER_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
100 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
101 -DSDL_VIDEO_DRIVER_X11=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
102 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
103 -DSDL_ASSEMBLY_ROUTINES=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
104 -DSDL_THREAD_PTHREAD_RECURSIVE_MUTEX=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
105 -DSDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
106 -DHAVE_GCC_SYNC_LOCK_TEST_AND_SET=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
107 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
108 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
109 link_libraries(X11 Xext) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
110 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
111 if (NOT CMAKE_SYSTEM_VERSION STREQUAL "Raspberry") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
112 # Raspberry Pi has no support for OpenGL |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
113 file(GLOB TMP |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
114 ${SDL_SOURCES_DIR}/src/render/opengl/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
115 ${SDL_SOURCES_DIR}/src/render/opengles2/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
116 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
117 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
118 list(APPEND SDL_SOURCES ${TMP}) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
119 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
120 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
121 -DSDL_VIDEO_OPENGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
122 -DSDL_VIDEO_OPENGL_ES2=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
123 -DSDL_VIDEO_RENDER_OGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
124 -DSDL_VIDEO_RENDER_OGL_ES2=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
125 -DSDL_VIDEO_OPENGL_GLX=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
126 -DSDL_VIDEO_OPENGL_EGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
127 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
128 endif() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
129 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
130 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
131 file(GLOB TMP |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
132 ${SDL_SOURCES_DIR}/src/audio/directsound/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
133 ${SDL_SOURCES_DIR}/src/audio/disk/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
134 ${SDL_SOURCES_DIR}/src/audio/winmm/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
135 ${SDL_SOURCES_DIR}/src/joystick/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
136 ${SDL_SOURCES_DIR}/src/haptic/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
137 ${SDL_SOURCES_DIR}/src/power/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
138 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
139 ${SDL_SOURCES_DIR}/src/main/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
140 ${SDL_SOURCES_DIR}/src/core/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
141 ${SDL_SOURCES_DIR}/src/loadso/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
142 ${SDL_SOURCES_DIR}/src/render/direct3d/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
143 ${SDL_SOURCES_DIR}/src/render/direct3d11/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
144 ${SDL_SOURCES_DIR}/src/render/opengl/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
145 ${SDL_SOURCES_DIR}/src/render/psp/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
146 ${SDL_SOURCES_DIR}/src/render/opengles/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
147 ${SDL_SOURCES_DIR}/src/render/opengles2/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
148 ${SDL_SOURCES_DIR}/src/render/software/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
149 ${SDL_SOURCES_DIR}/src/thread/generic/SDL_syscond.c # Don't include more files from "thread/generic/*.c"! |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
150 ${SDL_SOURCES_DIR}/src/thread/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
151 ${SDL_SOURCES_DIR}/src/timer/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
152 ${SDL_SOURCES_DIR}/src/video/windows/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
153 ${SDL_SOURCES_DIR}/src/windows/dlopen/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
154 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
155 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
156 list(APPEND SDL_SOURCES ${TMP}) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
157 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
158 # NB: OpenGL ES headers are not available in MinGW-W64 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
159 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
160 -DSDL_LOADSO_WINDOWS=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
161 -DSDL_THREAD_WINDOWS=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
162 -DSDL_TIMER_WINDOWS=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
163 -DSDL_POWER_WINDOWS=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
164 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
165 -DSDL_VIDEO_OPENGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
166 -DSDL_VIDEO_OPENGL_WGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
167 -DSDL_VIDEO_RENDER_D3D=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
168 -DSDL_VIDEO_RENDER_OGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
169 -DSDL_VIDEO_DRIVER_WINDOWS=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
170 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
171 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
172 if (MSVC) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
173 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
174 -D__FLTUSED__ |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
175 -DHAVE_LIBC=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
176 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
177 else() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
178 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
179 -DHAVE_GCC_ATOMICS=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
180 -DSDL_ASSEMBLY_ROUTINES=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
181 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
182 endif() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
183 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
184 link_libraries(imm32 winmm version) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
185 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
186 elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
187 file(GLOB TMP |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
188 ${SDL_SOURCES_DIR}/src/loadso/dlopen/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
189 ${SDL_SOURCES_DIR}/src/render/opengl/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
190 ${SDL_SOURCES_DIR}/src/render/opengles2/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
191 ${SDL_SOURCES_DIR}/src/render/software/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
192 ${SDL_SOURCES_DIR}/src/thread/pthread/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
193 ${SDL_SOURCES_DIR}/src/timer/unix/*.c |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
194 ${SDL_SOURCES_DIR}/src/video/cocoa/*.m |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
195 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
196 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
197 list(APPEND SDL_SOURCES ${TMP}) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
198 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
199 add_definitions( |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
200 -DSDL_LOADSO_DLOPEN=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
201 -DSDL_THREAD_PTHREAD=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
202 -DSDL_TIMER_UNIX=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
203 -DSDL_POWER_DISABLED=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
204 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
205 -DSDL_VIDEO_DRIVER_COCOA=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
206 -DSDL_VIDEO_OPENGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
207 -DSDL_VIDEO_OPENGL_CGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
208 -DSDL_VIDEO_RENDER_OGL=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
209 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
210 -DSDL_ASSEMBLY_ROUTINES=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
211 -DSDL_THREAD_PTHREAD_RECURSIVE_MUTEX=1 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
212 ) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
213 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
214 find_library(CARBON_LIBRARY Carbon) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
215 find_library(COCOA_LIBRARY Cocoa) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
216 find_library(IOKIT_LIBRARY IOKit) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
217 find_library(QUARTZ_LIBRARY QuartzCore) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
218 link_libraries(${CARBON_LIBRARY} ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${QUARTZ_LIBRARY}) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
219 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
220 endif() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
221 |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
222 else() |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
223 pkg_search_module(SDL2 REQUIRED sdl2) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
224 include_directories(${SDL2_INCLUDE_DIRS}) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
225 link_libraries(${SDL2_LIBRARIES}) |
917500c46fe0
moved the Platform folder from the Applications folder to the Stone library itself
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
226 endif() |