CMakeLists.txt

Fri, 16 Jul 2021 09:18:47 +0300

author
yakupbeyoglu
date
Fri, 16 Jul 2021 09:18:47 +0300
branch
4.x-dev
changeset 1720
229fcfacb5cb
parent 1656
ce2a730bc7aa
permissions
-rw-r--r--

Circular kernel fixes

1573
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
1 cmake_minimum_required(VERSION 3.5)
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
2 cmake_policy(VERSION 3.5)
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
3
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
4 project(Gorgon)
983
d38838abf15e * Partial embedding of external glsl files.
cemkalyoncu
parents: 870
diff changeset
5 add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Tools/ShaderEmbedder")
d38838abf15e * Partial embedding of external glsl files.
cemkalyoncu
parents: 870
diff changeset
6
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
7 set(GORGON_MAJOR_VERSION 4)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
8 set(GORGON_MINOR_VERSION 0)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
9 set(GORGON_PATCH_VERSION 0)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
10 set(GORGON_VERSION_ALPHA 1)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
11 set(GORGON_VERSION ${GORGON_MAJOR_VERSION}.${GORGON_MINOR_VERSION}.${GORGON_PATCH_VERSION})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
12
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
13 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Lib)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
14 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Lib)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
15 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Bin)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
16 set(CMAKE_TESTING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Testing)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
17 set(CMAKE_DOCUMENT_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Docs)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
18 set(PROJECT_BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}/Bin)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
19 set(PROJECT_PACKAGE_DIR ${CMAKE_CURRENT_LIST_DIR}/Package)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
20
1573
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
21 set(gorgon_external_options "" NONE BUILTIN SYSTEM)
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
22
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
23 #### SETTINGS ####
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
24
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
25 option(OPENGL "Use OpenGL as underlying GL. Should be ON for now." ON)
199
e6acf22bd64f * Merged with 3.1 branch
cemkalyoncu
parents:
diff changeset
26
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
27 option(AUDIO "Enable audio." ON)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
28
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
29 option(GORGON_FAST_ANY "Make any to work fast by removing empty checks. This will only apply to release mode." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
30
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
31 option(SCRIPTING "Enable scripting module." ON)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
32
1282
39dee6b2b133 *Creation of Gscript Generator
Luca Tonini
parents: 1165
diff changeset
33 option(GSCRIPT_GENERATOR "Create scripting resources." OFF)
39dee6b2b133 *Creation of Gscript Generator
Luca Tonini
parents: 1165
diff changeset
34
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
35 option(NO_LOGGING "Disables logger globally. If set, unit tests for logging will fail." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
36
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
37 option(TESTMODE "Enable test mode." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
38
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
39 option(DOCUMENTATION_GRAPHS "Enable graphs in documentation." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
40
1010
267a3b0a3005 * Initial design on UI components
cemkalyoncu
parents: 1005
diff changeset
41 option(TESTS "Enable compiling of test applications." OFF)
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
42
1581
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
43 if(WIN32)
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
44 set(FLAC BUILTIN CACHE STRING "Enable FLAC decoding and streaming.")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
45 else()
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
46 set(FLAC SYSTEM CACHE STRING "Enable FLAC decoding and streaming.")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
47 endif()
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
48 if(NOT FLAC IN_LIST gorgon_external_options)
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
49 message(FATAL_ERROR "FLAC should be set to one of ${gorgon_external_options}")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
50 endif()
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
51 set_property(CACHE FLAC PROPERTY STRINGS ${gorgon_external_options})
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
52
870
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
53
1010
267a3b0a3005 * Initial design on UI components
cemkalyoncu
parents: 1005
diff changeset
54 option(UI "Enable UI subsystem." ON)
267a3b0a3005 * Initial design on UI components
cemkalyoncu
parents: 1005
diff changeset
55
1573
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
56 if(WIN32)
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
57 set(FREETYPE BUILTIN CACHE STRING "Enable FreeType font support")
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
58 else()
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
59 set(FREETYPE SYSTEM CACHE STRING "Enable FreeType font support")
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
60 endif()
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
61 if("${FREETYPE}" STREQUAL "ON") #upgrading old options
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
62 set(FREETYPE SYSTEM CACHE STRING "Enable FreeType font support" FORCE)
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
63 endif()
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
64 if(NOT FREETYPE IN_LIST gorgon_external_options)
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
65 message(FATAL_ERROR "FREETYPE should be set to one of ${gorgon_external_options}")
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
66 endif()
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
67 set_property(CACHE FREETYPE PROPERTY STRINGS ${gorgon_external_options})
1129
24d987f6595b * FreeType glyph renderer support:
cemkalyoncu
parents: 1123
diff changeset
68
1582
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
69 if(WIN32)
1656
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
70 set(VORBIS BUILTIN CACHE STRING "Enable Vorbis audio support")
1582
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
71 else()
1656
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
72 set(VORBIS SYSTEM CACHE STRING "Enable Vorbis audio support")
1582
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
73 endif()
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
74 if(NOT VORBIS IN_LIST gorgon_external_options)
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
75 message(FATAL_ERROR "VORBIS should be set to one of ${gorgon_external_options}")
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
76 endif()
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
77 set_property(CACHE VORBIS PROPERTY STRINGS ${gorgon_external_options})
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
78
1656
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
79 if(WIN32)
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
80 set(FONTCONFIG NONE CACHE STRING "Enable Font config support")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
81 else()
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
82 set(FONTCONFIG SYSTEM CACHE STRING "Enable Font config support")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
83 endif()
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
84 if("${FONTCONFIG}" STREQUAL "ON") #upgrading old options
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
85 set(FONTCONFIG SYSTEM CACHE STRING "Enable FreeType font support" FORCE)
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
86 endif()
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
87 if(NOT FONTCONFIG IN_LIST gorgon_external_options)
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
88 message(FATAL_ERROR "FONTCONFIG should be set to one of ${gorgon_external_options}")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
89 endif()
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
90 set_property(CACHE FONTCONFIG PROPERTY STRINGS ${gorgon_external_options})
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
91
1123
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
92 OPTION(FORCE_32_BIT "Force 32 bit compilation" OFF)
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
93
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
94 set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
95
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
96 set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
97
821
8864a59aa4d6 * CMake fix
cemkalyoncu
parents: 815
diff changeset
98 set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
99
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
100 ######################
199
e6acf22bd64f * Merged with 3.1 branch
cemkalyoncu
parents:
diff changeset
101
1282
39dee6b2b133 *Creation of Gscript Generator
Luca Tonini
parents: 1165
diff changeset
102 if(GSCRIPT_GENERATOR)
39dee6b2b133 *Creation of Gscript Generator
Luca Tonini
parents: 1165
diff changeset
103 add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Tools/GscriptGenerator")
39dee6b2b133 *Creation of Gscript Generator
Luca Tonini
parents: 1165
diff changeset
104 endif()
39dee6b2b133 *Creation of Gscript Generator
Luca Tonini
parents: 1165
diff changeset
105
1149
ac1be49ebc11 * Hello World example project
cemkalyoncu
parents: 1140
diff changeset
106 set(ADDITIONAL_CLIENT_FLAGS )
ac1be49ebc11 * Hello World example project
cemkalyoncu
parents: 1140
diff changeset
107
1123
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
108 if(NOT(${FORCE_32_BIT}))
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
109 set(FIND_LIBRARY_USE_LIB64_PATHS ON)
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
110 if(NOT WIN32)
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
111 list(INSERT 0 CMAKE_SYSTEM_LIBRARY_PATH /usr/lib64)
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
112 endif()
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
113 endif()
7d4ba778fdee * 64 bit build is now default
cemkalyoncu
parents: 1110
diff changeset
114
416
7c04a3e33dcc * Partial testing system
cemkalyoncu
parents: 415
diff changeset
115
815
c0466d54ffb6 * Partial WASAPI support
cemkalyoncu
parents: 814
diff changeset
116 if(AUDIO AND (NOT AUDIOLIB OR AUDIOLIB STREQUAL ""))
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
117 if(WIN32)
853
c1c0902254ae * Audio playback for simple controllers on PulseAudio
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 839
diff changeset
118 set(AUDIOLIB WASAPI)
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
119 else()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
120 set(AUDIOLIB PULSE)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
121 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
122 endif()
539
62eafd61625e * Builtin types
cemkalyoncu
parents: 497
diff changeset
123
839
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
124 if(AUDIO)
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
125 add_definitions("-DAUDIO")
853
c1c0902254ae * Audio playback for simple controllers on PulseAudio
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 839
diff changeset
126 add_definitions("-DAUDIO_${AUDIOLIB}")
1149
ac1be49ebc11 * Hello World example project
cemkalyoncu
parents: 1140
diff changeset
127 string(APPEND ADDITIONAL_CLIENT_FLAGS " -DAUDIO")
ac1be49ebc11 * Hello World example project
cemkalyoncu
parents: 1140
diff changeset
128 string(APPEND ADDITIONAL_CLIENT_FLAGS " -DAUDIO_${AUDIOLIB}")
839
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
129 endif()
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
130
1581
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
131 if(FREETYPE STREQUAL "SYSTEM" OR FREETYPE STREQUAL "BUILTIN")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
132 add_definitions("-DFREETYPE_SUPPORT")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
133 string(APPEND ADDITIONAL_CLIENT_FLAGS " -DFREETYPE_SUPPORT")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
134 endif()
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
135
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
136 if(FLAC STREQUAL "SYSTEM" OR FLAC STREQUAL "BUILTIN")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
137 add_definitions("-DFLAC_SUPPORT")
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
138 string(APPEND ADDITIONAL_CLIENT_FLAGS " -DFLAC_SUPPORT")
1129
24d987f6595b * FreeType glyph renderer support:
cemkalyoncu
parents: 1123
diff changeset
139 endif()
24d987f6595b * FreeType glyph renderer support:
cemkalyoncu
parents: 1123
diff changeset
140
1582
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
141 if(VORBIS STREQUAL "SYSTEM" OR VORBIS STREQUAL "BUILTIN")
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
142 add_definitions("-DVORBIS_SUPPORT")
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
143 string(APPEND ADDITIONAL_CLIENT_FLAGS " -DVORBIS_SUPPORT")
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
144 endif()
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
145
1656
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
146 if(FONTCONFIG STREQUAL "SYSTEM" OR FONTCONFIG STREQUAL "BUILTIN")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
147 add_definitions("-DFONTCONFIG_SUPPORT")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
148 string(APPEND ADDITIONAL_CLIENT_FLAGS " -DFONTCONFIG_SUPPORT")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
149 endif()
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
150
839
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
151 if(SCRIPTING)
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
152 add_definitions("-DSCRIPTING")
1149
ac1be49ebc11 * Hello World example project
cemkalyoncu
parents: 1140
diff changeset
153 string(APPEND ADDITIONAL_CLIENT_FLAGS " -DSCRIPTING")
839
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
154 endif()
ddfaef71313f * Current state of the graphics module is done
cemkalyoncu
parents: 830
diff changeset
155
1135
f18bd4c5ae4f * New loading functions
cemkalyoncu
parents: 1129
diff changeset
156 if(OPENGL)
f18bd4c5ae4f * New loading functions
cemkalyoncu
parents: 1129
diff changeset
157 set(OpenGL_GL_PREFERENCE "LEGACY")
f18bd4c5ae4f * New loading functions
cemkalyoncu
parents: 1129
diff changeset
158 endif()
f18bd4c5ae4f * New loading functions
cemkalyoncu
parents: 1129
diff changeset
159
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
160 if(DOCUMENTATION_GRAPHS)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
161 set(DOXYGRAPH YES)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
162 else()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
163 set(DOXYGRAPH NO)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
164 endif()
752
99dffbaec693 * Function to instance member mapping
cemkalyoncu
parents: 579
diff changeset
165
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
166 if(TESTMODE)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
167 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
168 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
169
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
170 if(NO_LOGGING)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
171 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_LOGGING")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
172 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
173
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
174 if(GORGON_FAST_ANY)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
175 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DGORGON_FAST_ANY")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
176 endif()
808
94ef6d47c4fd * Skeleton for PulseAudio
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 795
diff changeset
177
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
178 if(OPENGL)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
179 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENGL")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
180 endif()
752
99dffbaec693 * Function to instance member mapping
cemkalyoncu
parents: 579
diff changeset
181
1387
2e91fa117d0f * Widget registry
cemkalyoncu
parents: 1362
diff changeset
182 if(UI)
2e91fa117d0f * Widget registry
cemkalyoncu
parents: 1362
diff changeset
183 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_UI")
2e91fa117d0f * Widget registry
cemkalyoncu
parents: 1362
diff changeset
184 endif()
2e91fa117d0f * Widget registry
cemkalyoncu
parents: 1362
diff changeset
185
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
186 if(UNIX)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
187 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX -Werror=return-type")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
188 else()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
189 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
190 endif()
810
36c313140b84 * Logger module
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 808
diff changeset
191
1387
2e91fa117d0f * Widget registry
cemkalyoncu
parents: 1362
diff changeset
192
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
193 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLM_SWIZZLE -DGLM_FORCE_RADIANS")
416
7c04a3e33dcc * Partial testing system
cemkalyoncu
parents: 415
diff changeset
194
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
195 # Make relative paths absolute (needed later on)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
196 foreach(p LIB BIN INCLUDE CMAKE)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
197 set(var INSTALL_${p}_DIR)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
198 if(NOT IS_ABSOLUTE "${${var}}")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
199 set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
200 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
201 endforeach()
469
204f261413ae * An empty GL module marking separation for GL related function from Graphics module
cemkalyoncu
parents: 450
diff changeset
202
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
203 include(Scripts/Compiler.cmake)
431
1c4ff08ac080 * String tokenizer is documented
cemkalyoncu
parents: 421
diff changeset
204
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
205 include(Scripts/Macros.cmake)
415
001cd0eb15db * CMake scripts does not need to specify paths anymore
cemkalyoncu
parents: 414
diff changeset
206
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
207 set(DebugLibs "")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
208 set(OptimizedLibs "")
795
4368c8f894af * Visual studio fixes for Struct definition (partial)
cemkalyoncu
parents: 793
diff changeset
209
764
7c71952bd75b Gorgon code base has been moved to Source/Gorgon
cengizkandemir
parents: 752
diff changeset
210 StartSource(Source/Gorgon)
414
4a78d100caae * Filesystem
cemkalyoncu
parents: 409
diff changeset
211
1634
86818ef47a72 * Freetype Fixes
yakupbeyoglu
parents: 1583
diff changeset
212
1010
267a3b0a3005 * Initial design on UI components
cemkalyoncu
parents: 1005
diff changeset
213 if(TESTS)
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
214 include(Scripts/Testing.cmake)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
215 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
216
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
217 include(Scripts/Doxygen.cmake)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
218
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
219 add_library(Gorgon STATIC ${All})
416
7c04a3e33dcc * Partial testing system
cemkalyoncu
parents: 415
diff changeset
220
1362
6ff4adabed06 #21: Layer related crash has been solved
cemkalyoncu
parents: 1319
diff changeset
221 if(MSVC)
6ff4adabed06 #21: Layer related crash has been solved
cemkalyoncu
parents: 1319
diff changeset
222 target_compile_options(Gorgon PRIVATE "/MP")
6ff4adabed06 #21: Layer related crash has been solved
cemkalyoncu
parents: 1319
diff changeset
223 endif()
6ff4adabed06 #21: Layer related crash has been solved
cemkalyoncu
parents: 1319
diff changeset
224
1005
cfd2060d8e8e * Rectangle now have separate tiling flags
cemkalyoncu
parents: 983
diff changeset
225 set_property(TARGET Gorgon PROPERTY CXX_STANDARD 14)
cfd2060d8e8e * Rectangle now have separate tiling flags
cemkalyoncu
parents: 983
diff changeset
226
1319
6b741d04727f * KeyRepeater::SetupAcceleration
cemkalyoncu
parents: 1282
diff changeset
227 #if(WIN32)
1165
b8bcc739aad2 * New transitioning system for UI components
cemkalyoncu
parents: 1149
diff changeset
228 set_target_properties(Gorgon PROPERTIES
b8bcc739aad2 * New transitioning system for UI components
cemkalyoncu
parents: 1149
diff changeset
229 DEBUG_OUTPUT_NAME Gorgon_d
b8bcc739aad2 * New transitioning system for UI components
cemkalyoncu
parents: 1149
diff changeset
230 RELWITHDEBINFO_OUTPUT_NAME Gorgon_rd
b8bcc739aad2 * New transitioning system for UI components
cemkalyoncu
parents: 1149
diff changeset
231 MINSIZEREL_OUTPUT_NAME Gorgon_min
b8bcc739aad2 * New transitioning system for UI components
cemkalyoncu
parents: 1149
diff changeset
232 )
1319
6b741d04727f * KeyRepeater::SetupAcceleration
cemkalyoncu
parents: 1282
diff changeset
233 #endif()
1165
b8bcc739aad2 * New transitioning system for UI components
cemkalyoncu
parents: 1149
diff changeset
234
983
d38838abf15e * Partial embedding of external glsl files.
cemkalyoncu
parents: 870
diff changeset
235 if(NOT ${deps} STREQUAL "")
d38838abf15e * Partial embedding of external glsl files.
cemkalyoncu
parents: 870
diff changeset
236 add_dependencies(Gorgon ${deps})
d38838abf15e * Partial embedding of external glsl files.
cemkalyoncu
parents: 870
diff changeset
237 endif()
d38838abf15e * Partial embedding of external glsl files.
cemkalyoncu
parents: 870
diff changeset
238
d38838abf15e * Partial embedding of external glsl files.
cemkalyoncu
parents: 870
diff changeset
239
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
240 include_directories(Source/External)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
241 include_directories(Source)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
242
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
243 target_link_libraries(Gorgon ${Libs})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
244
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
245 if(NOT DebugLibs STREQUAL "")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
246 target_link_libraries(Gorgon debug ${DebugLibs})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
247 endif()
448
aa7c23353732 * Event is completed
cemkalyoncu
parents: 431
diff changeset
248
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
249 if(NOT OptimizedLibs STREQUAL "")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
250 target_link_libraries(Gorgon optimized ${OptimizedLibs})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
251 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
252
870
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
253
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
254 install(TARGETS Gorgon
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
255 EXPORT GorgonTargets
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
256 ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
257 PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/Gorgon"
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
258 )
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
259
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
260
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
261 export(TARGETS Gorgon FILE "${PROJECT_PACKAGE_DIR}/GorgonTargets.cmake")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
262 export(PACKAGE Gorgon)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
263
1581
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
264 if(FLAC STREQUAL "BUILTIN")
870
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
265 add_subdirectory(Source/External/flac)
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
266
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
267 include_directories(Source/External/flac/include)
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
268
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
269 add_definitions("-DFLAC__NO_DLL")
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
270
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
271 target_link_libraries(Gorgon flac)
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
272 endif()
1581
6b54311fb164 * FLAC can now be used from system
cemkalyoncu
parents: 1573
diff changeset
273
1573
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
274 if(FREETYPE STREQUAL "BUILTIN")
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
275 add_subdirectory(Source/External/freetype)
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
276
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
277 include_directories(Source/External/freetype/include)
1634
86818ef47a72 * Freetype Fixes
yakupbeyoglu
parents: 1583
diff changeset
278 set(FREETYPE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/Source/External/freetype/include)
1573
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
279
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
280 target_link_libraries(Gorgon freetype)
bec9b011ecb6 * FreeType builtin compilation
cemkalyoncu
parents: 1387
diff changeset
281 endif()
870
427acef8d34a * FLAC encoding and decoding support
cemkalyoncu
parents: 853
diff changeset
282
1582
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
283 if(VORBIS STREQUAL "BUILTIN")
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
284 add_subdirectory(Source/External/vorbis)
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
285
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
286 include_directories(Source/External/vorbis/include)
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
287
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
288 target_link_libraries(Gorgon vorbis)
1583
1056c0f51c2c * Builtin Vorbis support
cemkalyoncu
parents: 1582
diff changeset
289
1056c0f51c2c * Builtin Vorbis support
cemkalyoncu
parents: 1582
diff changeset
290 add_subdirectory(Source/External/ogg)
1056c0f51c2c * Builtin Vorbis support
cemkalyoncu
parents: 1582
diff changeset
291
1056c0f51c2c * Builtin Vorbis support
cemkalyoncu
parents: 1582
diff changeset
292 include_directories(Source/External/ogg/include)
1582
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
293 endif()
ea585d23545c * Vorbis streaming through system libraries
cemkalyoncu
parents: 1581
diff changeset
294
1656
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
295 if(FONTCONFIG STREQUAL "BUILTIN")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
296 message(FATAL_ERROR "Built-in fontconfig is not supported yet.")
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
297 endif()
ce2a730bc7aa * Listing fonts installed in the operating system
cemkalyoncu
parents: 1634
diff changeset
298
1050
2ff59e24f4f2 * Keycode uniformity win32 part 1
cemkalyoncu
parents: 1010
diff changeset
299 if(WIN32)
2ff59e24f4f2 * Keycode uniformity win32 part 1
cemkalyoncu
parents: 1010
diff changeset
300 add_definitions("-DDWM")
2ff59e24f4f2 * Keycode uniformity win32 part 1
cemkalyoncu
parents: 1010
diff changeset
301 else()
2ff59e24f4f2 * Keycode uniformity win32 part 1
cemkalyoncu
parents: 1010
diff changeset
302 add_definitions("-DX11")
2ff59e24f4f2 * Keycode uniformity win32 part 1
cemkalyoncu
parents: 1010
diff changeset
303 endif()
2ff59e24f4f2 * Keycode uniformity win32 part 1
cemkalyoncu
parents: 1010
diff changeset
304
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
305 file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
306 "${INSTALL_INCLUDE_DIR}")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
307
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
308 set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/Source")
793
a5471d749e9b * Initial work on structure definition
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 792
diff changeset
309
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
310 configure_file(Scripts/GorgonConfig.cmake.in
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
311 "${PROJECT_PACKAGE_DIR}/GorgonConfig.cmake" @ONLY)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
312
830
dc937409ad24 * Partial design document
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 821
diff changeset
313 set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/Source")
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
314 configure_file(Scripts/GorgonConfig.cmake.in
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
315 "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/GorgonConfig.cmake" @ONLY)
793
a5471d749e9b * Initial work on structure definition
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 792
diff changeset
316
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
317 configure_file(Scripts/GorgonConfigVersion.cmake.in
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
318 "${PROJECT_PACKAGE_DIR}/GorgonConfigVersion.cmake" @ONLY)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
319
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
320 install(FILES
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
321 "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/GorgonConfig.cmake"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
322 "${PROJECT_PACKAGE_DIR}/GorgonConfigVersion.cmake"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
323 DESTINATION "${INSTALL_CMAKE_DIR}"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
324 )
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
325
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
326 install(EXPORT GorgonTargets DESTINATION "${INSTALL_CMAKE_DIR}")

mercurial