Lines 1-8
Link Here
|
1 |
--- libopenage/CMakeLists.txt.orig 2018-07-14 15:12:15 UTC |
1 |
--- libopenage/CMakeLists.txt.orig 2020-08-15 10:50:07 UTC |
2 |
+++ libopenage/CMakeLists.txt |
2 |
+++ libopenage/CMakeLists.txt |
3 |
@@ -86,13 +86,21 @@ if(MSVC) |
3 |
@@ -38,13 +38,21 @@ if(WIN32) |
4 |
endif() |
4 |
endif() |
5 |
if(NOT APPLE AND NOT MSVC) |
5 |
if(NOT APPLE AND NOT WIN32) |
6 |
find_library(RT_LIB rt) |
6 |
find_library(RT_LIB rt) |
7 |
- if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") |
7 |
- if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") |
8 |
- find_library(EXECINFO_LIB execinfo) |
8 |
- find_library(EXECINFO_LIB execinfo) |
Lines 16-32
Link Here
|
16 |
+ find_library(NYAN_LIBRARY NAMES "nyan" PATHS /usr/local/lib ) |
16 |
+ find_library(NYAN_LIBRARY NAMES "nyan" PATHS /usr/local/lib ) |
17 |
+ list(APPEND CMAKE_REQUIRED_INCLUDES ${NYAN_INCLUDE_DIR}) |
17 |
+ list(APPEND CMAKE_REQUIRED_INCLUDES ${NYAN_INCLUDE_DIR}) |
18 |
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${NYAN_LIBRARY}) |
18 |
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${NYAN_LIBRARY}) |
19 |
+ |
19 |
|
20 |
+# message(STATUS ${NYAN_INCLUDE_DIR}) |
20 |
+# message(STATUS ${NYAN_INCLUDE_DIR}) |
21 |
+# message(STATUS ${NYAN_LIBRARY}) |
21 |
+# message(STATUS ${NYAN_LIBRARY}) |
22 |
+endif() |
22 |
+endif() |
23 |
+ |
23 |
+ |
24 |
|
24 |
+ |
25 |
+find_library(FONTCONFIG_LIB fontconfig) |
25 |
+find_library(FONTCONFIG_LIB fontconfig) |
26 |
find_package(Freetype REQUIRED) |
26 |
find_package(Freetype REQUIRED) |
27 |
find_package(OpenGL REQUIRED) |
|
|
28 |
find_package(PNG REQUIRED) |
27 |
find_package(PNG REQUIRED) |
29 |
@@ -115,74 +123,74 @@ endif() |
28 |
find_package(SDL2 REQUIRED) |
|
|
29 |
@@ -70,78 +78,78 @@ endif() |
30 |
|
30 |
|
31 |
# first, try to locate nyan directly |
31 |
# first, try to locate nyan directly |
32 |
# this discovers the system package or the user-registry package |
32 |
# this discovers the system package or the user-registry package |
Lines 35-42
Link Here
|
35 |
|
35 |
|
36 |
# if this didn't work, we can download nyan like a git submodule. |
36 |
# if this didn't work, we can download nyan like a git submodule. |
37 |
# this is the treeish to be checked out. |
37 |
# this is the treeish to be checked out. |
38 |
-set(nyan_clone_version origin/master) |
38 |
-if(NOT DEFINED NYAN_CLONE_VERSION) |
39 |
+#set(nyan_clone_version origin/master) |
39 |
- set(NYAN_CLONE_VERSION origin/master) |
|
|
40 |
-endif() |
41 |
+#if(NOT DEFINED NYAN_CLONE_VERSION) |
42 |
+# set(NYAN_CLONE_VERSION origin/master) |
43 |
+#endif() |
40 |
|
44 |
|
41 |
-option( |
45 |
-option( |
42 |
- DOWNLOAD_NYAN |
46 |
- DOWNLOAD_NYAN |
Lines 76-115
Link Here
|
76 |
# or if it was used before. |
80 |
# or if it was used before. |
77 |
-if((NOT nyan_FOUND AND DOWNLOAD_NYAN) OR FORCE_DOWNLOAD_NYAN) |
81 |
-if((NOT nyan_FOUND AND DOWNLOAD_NYAN) OR FORCE_DOWNLOAD_NYAN) |
78 |
- message(STATUS "Downloading nyan as submodule project...") |
82 |
- message(STATUS "Downloading nyan as submodule project...") |
79 |
- |
|
|
80 |
- if(DISABLE_SUBPROJECT_UPDATES) |
81 |
- set(DISABLE_NYAN_UPDATES "DISABLE_UPDATES") |
82 |
- endif() |
83 |
- |
84 |
- fetch_project( |
85 |
- NAME nyan |
86 |
- ${DISABLE_NYAN_UPDATES} |
87 |
- GIT_REPOSITORY https://github.com/SFTtech/nyan |
88 |
- GIT_TAG ${nyan_clone_version} |
89 |
- ) |
90 |
- |
91 |
- # don't register nyan to the userpackage-repo! |
92 |
- set(REGISTER_USERPACKAGE OFF) |
93 |
- # don't generate the `doc` target again (name conflict!) |
94 |
- set(DOXYGEN_ENABLE OFF) |
95 |
- |
96 |
- # register the targets |
97 |
- add_subdirectory(${nyan_SOURCE_DIR} ${nyan_BINARY_DIR}) |
98 |
- |
99 |
- message(STATUS "nyan processed successfully!") |
100 |
- |
101 |
-elseif(NOT nyan_FOUND) |
102 |
- message(FATAL_ERROR " |
103 |
- Could not find the cmake package configuration file \"nyanConfig.cmake\". |
104 |
- To find it, you have several options: |
105 |
- * If your distribution provides it, install \"nyan\" through the package manager. |
106 |
- * If you want openage to automatically download \"nyan\", append `-DDOWNLOAD_NYAN=YES` to the cmake invocation or use `./configure --download-nyan`. |
107 |
- * If you want to build nyan manually, follow the build instructions: |
108 |
- [[ doc/building.md#nyan-installation ]] |
109 |
- * If you already built nyan but it still can't be found (cmake package repo fails): |
110 |
- * Try to set \"nyan_DIR\" to the nyan build directory (it contains nyanConfig.cmake) |
111 |
- either through: \"./configure $youroptions -- -Dnyan_DIR=/home/dev/nyan/build\" |
112 |
- or: \"cmake $yourotheroptions -Dnyan_DIR=/home/dev/nyan/build ..\" |
113 |
+#if((NOT nyan_FOUND AND DOWNLOAD_NYAN) OR FORCE_DOWNLOAD_NYAN) |
83 |
+#if((NOT nyan_FOUND AND DOWNLOAD_NYAN) OR FORCE_DOWNLOAD_NYAN) |
114 |
+# message(STATUS "Downloading nyan as submodule project...") |
84 |
+# message(STATUS "Downloading nyan as submodule project...") |
115 |
+# |
85 |
+# |
Lines 121-127
Link Here
|
121 |
+# NAME nyan |
91 |
+# NAME nyan |
122 |
+# ${DISABLE_NYAN_UPDATES} |
92 |
+# ${DISABLE_NYAN_UPDATES} |
123 |
+# GIT_REPOSITORY https://github.com/SFTtech/nyan |
93 |
+# GIT_REPOSITORY https://github.com/SFTtech/nyan |
124 |
+# GIT_TAG ${nyan_clone_version} |
94 |
+# GIT_TAG ${NYAN_CLONE_VERSION} |
125 |
+# ) |
95 |
+# ) |
126 |
+# |
96 |
+# |
127 |
+# # don't register nyan to the userpackage-repo! |
97 |
+# # don't register nyan to the userpackage-repo! |
Lines 133-143
Link Here
|
133 |
+# add_subdirectory(${nyan_SOURCE_DIR} ${nyan_BINARY_DIR}) |
103 |
+# add_subdirectory(${nyan_SOURCE_DIR} ${nyan_BINARY_DIR}) |
134 |
+# |
104 |
+# |
135 |
+# message(STATUS "nyan processed successfully!") |
105 |
+# message(STATUS "nyan processed successfully!") |
136 |
|
106 |
+# |
137 |
- In case of other problems, please try to figure them out (and tell us what you did). |
|
|
138 |
- Contact information is in README.md. |
139 |
-") |
140 |
-endif() |
141 |
+#elseif(NOT nyan_FOUND) |
107 |
+#elseif(NOT nyan_FOUND) |
142 |
+# message(FATAL_ERROR " |
108 |
+# message(FATAL_ERROR " |
143 |
+# Could not find the cmake package configuration file \"nyanConfig.cmake\". |
109 |
+# Could not find the cmake package configuration file \"nyanConfig.cmake\". |
Lines 156-178
Link Here
|
156 |
+#") |
122 |
+#") |
157 |
+#endif() |
123 |
+#endif() |
158 |
|
124 |
|
|
|
125 |
- if(DISABLE_SUBPROJECT_UPDATES) |
126 |
- set(DISABLE_NYAN_UPDATES "DISABLE_UPDATES") |
127 |
- endif() |
128 |
|
129 |
- fetch_project( |
130 |
- NAME nyan |
131 |
- ${DISABLE_NYAN_UPDATES} |
132 |
- GIT_REPOSITORY https://github.com/SFTtech/nyan |
133 |
- GIT_TAG ${NYAN_CLONE_VERSION} |
134 |
- ) |
135 |
- |
136 |
- # don't register nyan to the userpackage-repo! |
137 |
- set(REGISTER_USERPACKAGE OFF) |
138 |
- # don't generate the `doc` target again (name conflict!) |
139 |
- set(DOXYGEN_ENABLE OFF) |
140 |
- |
141 |
- # register the targets |
142 |
- add_subdirectory(${nyan_SOURCE_DIR} ${nyan_BINARY_DIR}) |
143 |
- |
144 |
- message(STATUS "nyan processed successfully!") |
145 |
- |
146 |
-elseif(NOT nyan_FOUND) |
147 |
- message(FATAL_ERROR " |
148 |
- Could not find the cmake package configuration file \"nyanConfig.cmake\". |
149 |
- To find it, you have several options: |
150 |
- * If your distribution provides it, install \"nyan\" through the package manager. |
151 |
- * If you want openage to automatically download \"nyan\", append `-DDOWNLOAD_NYAN=YES` to the cmake invocation or use `./configure --download-nyan`. |
152 |
- * If you want to build nyan manually, follow the build instructions: |
153 |
- [[ doc/building.md#nyan-installation ]] |
154 |
- * If you already built nyan but it still can't be found (cmake package repo fails): |
155 |
- * Try to set \"nyan_DIR\" to the nyan build directory (it contains nyanConfig.cmake) |
156 |
- either through: \"./configure $youroptions -- -Dnyan_DIR=/home/dev/nyan/build\" |
157 |
- or: \"cmake $yourotheroptions -Dnyan_DIR=/home/dev/nyan/build ..\" |
158 |
- |
159 |
- In case of other problems, please try to figure them out (and tell us what you did). |
160 |
- Contact information is in README.md. |
161 |
-") |
162 |
-endif() |
163 |
- |
164 |
- |
165 |
################################################## |
166 |
# optional dependencies |
159 |
|
167 |
|
160 |
if(GCCBacktrace_FOUND) |
168 |
@@ -264,6 +272,7 @@ target_include_directories(libopenage |
161 |
@@ -245,6 +253,7 @@ include_directories( |
|
|
162 |
${SDL2IMAGE_INCLUDE_DIRS} |
169 |
${SDL2IMAGE_INCLUDE_DIRS} |
163 |
${HarfBuzz_INCLUDE_DIRS} |
170 |
${HarfBuzz_INCLUDE_DIRS} |
164 |
${QTPLATFORM_INCLUDE_DIRS} |
171 |
${QTPLATFORM_INCLUDE_DIRS} |
165 |
+ ${NYAN_INCLUDE_DIRS} |
172 |
+ ${NYAN_INCLUDE_DIRS} |
166 |
) |
173 |
) |
167 |
|
174 |
|
168 |
# link the executable to those libraries |
175 |
################################################## |
169 |
@@ -265,7 +274,8 @@ target_link_libraries(libopenage |
176 |
@@ -274,7 +283,8 @@ target_include_directories(libopenage |
170 |
${RT_LIB} |
177 |
target_link_libraries(libopenage |
171 |
${OGG_LIB} |
178 |
PRIVATE |
172 |
${EXECINFO_LIB} |
179 |
Threads::Threads |
173 |
- nyan::nyan |
180 |
- nyan::nyan |
174 |
+ ${NYAN_LIBRARY} |
181 |
+ ${NYAN_LIBRARY} |
175 |
+# nyan::nyan |
182 |
+# nyan::nyan |
176 |
|
183 |
Eigen3::Eigen |
177 |
# TODO: change to PUBLIC (or, alternatively, remove all keywords |
184 |
${PNG_LIBRARIES} |
178 |
# of this type) when qt cmake scripts change declarations of the |
185 |
${OPUS_LIBRARIES} |