Merge lp:~faubulous/inkscape/cmake-win32 into lp:~inkscape.dev/inkscape/trunk
- cmake-win32
- Merge into trunk
Status: | Merged |
---|---|
Merge reported by: | Patrick Storz |
Merged at revision: | not available |
Proposed branch: | lp:~faubulous/inkscape/cmake-win32 |
Merge into: | lp:~inkscape.dev/inkscape/trunk |
Diff against target: |
872 lines (+510/-143) (has conflicts) 10 files modified
AUTHORS (+2/-0) CMakeLists.txt (+277/-46) CMakeScripts/ConfigPaths.cmake (+146/-2) CMakeScripts/DefineDependsandFlags.cmake (+21/-66) build/configure.bat (+9/-0) build/touch.bat (+4/-0) config.h.cmake (+8/-0) mingwenv.bat (+2/-2) src/CMakeLists.txt (+41/-26) touch.bat (+0/-1) Text conflict in CMakeLists.txt Contents conflict in configure.bat Text conflict in src/CMakeLists.txt |
To merge this branch: | bzr merge lp:~faubulous/inkscape/cmake-win32 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jon A. Cruz | Needs Fixing | ||
Review via email: mp+293202@code.launchpad.net |
Commit message
Description of the change
Just to get a diff with lp:inkscape to ease testing.
jazzynico (jazzynico) wrote : | # |
jazzynico (jazzynico) wrote : | # |
> 'make' failed when linking to the libinkscape_base shared library.
Correction. Not when linking to, but when linking the libinkscape_
----
d:/dev/
... same line with different libs here ...
d:/dev/
collect2: ld returned 1 exit status
mingw32-make[2]: *** [lib/libinkscap
mingw32-make[1]: *** [src/CMakeFiles
mingw32-make: *** [all] Error 2
----
Jon A. Cruz (jon-joncruz) wrote : | # |
I'll have to finish reconciling with my local work, but the cmake files themselves do need some adjustment.
There are several lines that have been duplicated into if/else Windows blocks when adjusting to use the proper variables would allow a single line to be shared for all platforms.
- 14868. By Sebastian Faubel
-
Detecting changes in the build environment in configure.bat
- 14869. By Sebastian Faubel
-
Configure script detects changes in the build environment and resets PATH accordingly.
Bugfix: Compile errors when trailing slash or backslash is missing from GS_PATH.
Sebastian Faubel (faubulous) wrote : | # |
Dear Jon,
it seems that the 0.92 release is getting closer. Is there any progress
with CMake on Windows?
~Sebastian
*Semiodesk GmbH | *Werner-
Germany | Phone: +49 821 8854401 | Fax: +49 821 8854410 | www.semiodesk.com
This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended recipient(s).
Any unauthorized disclosure, dissemination, distribution, copying or the
taking of any action in reliance on the information herein is prohibited.
E-mails are not secure and cannot be guaranteed to be error free as they
can be intercepted, amended, or contain viruses. Anyone who communicates
with us by e-mail is deemed to have accepted these risks. Semiodesk GmbH is
not responsible for errors or omissions in this message and denies any
responsibility for any damage arising from the use of e-mail. Any opinion
and other statement contained in this message and any attachment are solely
those of the author and do not necessarily represent those of the company.
2016-04-28 15:37 GMT+02:00 Jon A. Cruz <email address hidden>:
> Review: Needs Fixing
>
> I'll have to finish reconciling with my local work, but the cmake files
> themselves do need some adjustment.
>
> There are several lines that have been duplicated into if/else Windows
> blocks when adjusting to use the proper variables would allow a single line
> to be shared for all platforms.
> --
> https:/
> You are the owner of lp:~faubulous/inkscape/cmake-win32.
>
- 14870. By Sebastian Faubel
-
Inkscape can now be built using other shells and without invoking configure.bat
Moved Windows environment variables into ConfigPaths.cmake - 14871. By Sebastian Faubel
-
Locales and app icon are now working.
- 14872. By Sebastian Faubel
-
Fixed generation of config.h
- 14873. By Sebastian Faubel
-
Removed BR options from CMakeLists.txt as they are optional.
Patrick Storz (ede123) wrote : | # |
I think most of these changes have already been merged (not directly, though), notably revisions 14855, 15011 and 15024.
If there is anything in here that we still want please let us know!
Preview Diff
1 | === modified file 'AUTHORS' | |||
2 | --- AUTHORS 2016-02-27 17:38:36 +0000 | |||
3 | +++ AUTHORS 2016-06-28 06:54:18 +0000 | |||
4 | @@ -172,3 +172,5 @@ | |||
5 | 172 | Daniel Yacob | 172 | Daniel Yacob |
6 | 173 | David Yip | 173 | David Yip |
7 | 174 | Masatake Yamato | 174 | Masatake Yamato |
8 | 175 | Moritz Eberl | ||
9 | 176 | Sebastian Faubel | ||
10 | 175 | \ No newline at end of file | 177 | \ No newline at end of file |
11 | 176 | 178 | ||
12 | === modified file 'CMakeLists.txt' | |||
13 | --- CMakeLists.txt 2016-06-10 15:45:22 +0000 | |||
14 | +++ CMakeLists.txt 2016-06-28 06:54:18 +0000 | |||
15 | @@ -7,12 +7,59 @@ | |||
16 | 7 | message("Binary Dir: ${CMAKE_CURRENT_BINARY_DIR}") | 7 | message("Binary Dir: ${CMAKE_CURRENT_BINARY_DIR}") |
17 | 8 | 8 | ||
18 | 9 | # ----------------------------------------------------------------------------- | 9 | # ----------------------------------------------------------------------------- |
19 | 10 | # Set platform defaults (originally copied from darktable) | ||
20 | 11 | # ----------------------------------------------------------------------------- | ||
21 | 12 | include(CMakeScripts/ConfigPaths.cmake) | ||
22 | 13 | |||
23 | 14 | if(WIN32) | ||
24 | 15 | message("-- Windows build detected, setting default features") | ||
25 | 16 | |||
26 | 17 | list(INSERT CMAKE_SYSTEM_INCLUDE_PATH 0 ${DEVLIBS_PATH}) | ||
27 | 18 | list(INSERT CMAKE_SYSTEM_LIBRARY_PATH 0 ${DEVLIBS_PATH}) | ||
28 | 19 | |||
29 | 20 | set(CMAKE_C_COMPILER "${MINGW_BIN}/gcc.exe") | ||
30 | 21 | set(CMAKE_C_LINK_EXECUTABLE "${MINGW_BIN}/gcc.exe") | ||
31 | 22 | set(CMAKE_CXX_COMPILER "${MINGW_BIN}/g++.exe") | ||
32 | 23 | set(CMAKE_CXX_LINK_EXECUTABLE "${MINGW_BIN}/g++.exe") | ||
33 | 24 | set(CMAKE_CXX_STANDARD 11) | ||
34 | 25 | |||
35 | 26 | # Setup Windows resource files compiler. | ||
36 | 27 | set(CMAKE_RC_COMPILER "${MINGW_BIN}/windres.exe") | ||
37 | 28 | set(CMAKE_RC_COMPILER_INIT windres) | ||
38 | 29 | enable_language(RC) | ||
39 | 30 | set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -i <SOURCE> -o <OBJECT>") | ||
40 | 31 | |||
41 | 32 | # These options are required for having i18n support on Windows. | ||
42 | 33 | option(ENABLE_NLS "Compile with i18n enabled" ON) | ||
43 | 34 | option(HAVE_BIND_TEXTDOMAIN_CODESET "Compile with 'bind_textdomain_codeset' function" ON) | ||
44 | 35 | endif(WIN32) | ||
45 | 36 | |||
46 | 37 | if(APPLE) | ||
47 | 38 | message("-- Mac OS X build detected, setting default features") | ||
48 | 39 | # prefer macports and/or user-installed libraries over system ones | ||
49 | 40 | #LIST(APPEND CMAKE_PREFIX_PATH /opt/local /usr/local) | ||
50 | 41 | set(CMAKE_FIND_FRAMEWORK "LAST") | ||
51 | 42 | |||
52 | 43 | # test and display relevant env variables | ||
53 | 44 | if(DEFINED ENV{CMAKE_PREFIX_PATH}) | ||
54 | 45 | message("CMAKE_PREFIX_PATH: $ENV{CMAKE_PREFIX_PATH}") | ||
55 | 46 | endif() | ||
56 | 47 | if(DEFINED ENV{GTKMM_BASEPATH}) | ||
57 | 48 | message("GTKMM_BASEPATH: $ENV{GTKMM_BASEPATH}") | ||
58 | 49 | endif() | ||
59 | 50 | |||
60 | 51 | # detect current GTK+ backend | ||
61 | 52 | pkg_check_variable(gtk+-2.0 target) | ||
62 | 53 | message("GTK2 backend: ${GTK+_2.0_TARGET}") | ||
63 | 54 | endif() | ||
64 | 55 | |||
65 | 56 | # ----------------------------------------------------------------------------- | ||
66 | 10 | # CMake Configuration | 57 | # CMake Configuration |
67 | 11 | # ----------------------------------------------------------------------------- | 58 | # ----------------------------------------------------------------------------- |
68 | 12 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeScripts/Modules") | 59 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeScripts/Modules") |
69 | 13 | 60 | ||
70 | 14 | # avoid having empty buildtype | 61 | # avoid having empty buildtype |
72 | 15 | set(CMAKE_BUILD_TYPE_INIT "Release") | 62 | set(CMAKE_BUILD_TYPE_INIT "Debug") |
73 | 16 | 63 | ||
74 | 17 | project(inkscape) | 64 | project(inkscape) |
75 | 18 | 65 | ||
76 | @@ -41,29 +88,6 @@ | |||
77 | 41 | include(CMakeScripts/HelperFunctions.cmake) | 88 | include(CMakeScripts/HelperFunctions.cmake) |
78 | 42 | 89 | ||
79 | 43 | # ----------------------------------------------------------------------------- | 90 | # ----------------------------------------------------------------------------- |
80 | 44 | # Set platform defaults (originally copied from darktable) | ||
81 | 45 | # ----------------------------------------------------------------------------- | ||
82 | 46 | if(APPLE) | ||
83 | 47 | message("-- Mac OS X build detected, setting default features") | ||
84 | 48 | # prefer macports and/or user-installed libraries over system ones | ||
85 | 49 | #LIST(APPEND CMAKE_PREFIX_PATH /opt/local /usr/local) | ||
86 | 50 | set(CMAKE_FIND_FRAMEWORK "LAST") | ||
87 | 51 | |||
88 | 52 | # test and display relevant env variables | ||
89 | 53 | if(DEFINED ENV{CMAKE_PREFIX_PATH}) | ||
90 | 54 | message("CMAKE_PREFIX_PATH: $ENV{CMAKE_PREFIX_PATH}") | ||
91 | 55 | endif() | ||
92 | 56 | if(DEFINED ENV{GTKMM_BASEPATH}) | ||
93 | 57 | message("GTKMM_BASEPATH: $ENV{GTKMM_BASEPATH}") | ||
94 | 58 | endif() | ||
95 | 59 | |||
96 | 60 | # detect current GTK+ backend | ||
97 | 61 | pkg_check_variable(gtk+-2.0 target) | ||
98 | 62 | message("GTK2 backend: ${GTK+_2.0_TARGET}") | ||
99 | 63 | |||
100 | 64 | endif(APPLE) | ||
101 | 65 | |||
102 | 66 | # ----------------------------------------------------------------------------- | ||
103 | 67 | # Redirect output files | 91 | # Redirect output files |
104 | 68 | # ----------------------------------------------------------------------------- | 92 | # ----------------------------------------------------------------------------- |
105 | 69 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" ) | 93 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" ) |
106 | @@ -91,6 +115,7 @@ | |||
107 | 91 | option(WITH_NLS "Compile with Native Language Support (using gettext)" ON) | 115 | option(WITH_NLS "Compile with Native Language Support (using gettext)" ON) |
108 | 92 | option(WITH_GTK3_EXPERIMENTAL "Enable compilation with GTK+3 (EXPERIMENTAL!)" OFF) | 116 | option(WITH_GTK3_EXPERIMENTAL "Enable compilation with GTK+3 (EXPERIMENTAL!)" OFF) |
109 | 93 | 117 | ||
110 | 118 | <<<<<<< TREE | ||
111 | 94 | # ----------------------------------------------------------------------------- | 119 | # ----------------------------------------------------------------------------- |
112 | 95 | # Test Harness | 120 | # Test Harness |
113 | 96 | # ----------------------------------------------------------------------------- | 121 | # ----------------------------------------------------------------------------- |
114 | @@ -105,10 +130,11 @@ | |||
115 | 105 | endif() | 130 | endif() |
116 | 106 | 131 | ||
117 | 107 | include(CMakeScripts/ConfigPaths.cmake) # Installation Paths | 132 | include(CMakeScripts/ConfigPaths.cmake) # Installation Paths |
118 | 133 | ======= | ||
119 | 134 | >>>>>>> MERGE-SOURCE | ||
120 | 108 | include(CMakeScripts/DefineDependsandFlags.cmake) # Includes, Compiler Flags, and Link Libraries | 135 | include(CMakeScripts/DefineDependsandFlags.cmake) # Includes, Compiler Flags, and Link Libraries |
121 | 109 | include(CMakeScripts/HelperMacros.cmake) # Misc Utility Macros | 136 | include(CMakeScripts/HelperMacros.cmake) # Misc Utility Macros |
122 | 110 | 137 | ||
123 | 111 | |||
124 | 112 | # ----------------------------------------------------------------------------- | 138 | # ----------------------------------------------------------------------------- |
125 | 113 | # BAD HACKS, NEED TO INVESTIGATE MAKING THESE LESS BAD | 139 | # BAD HACKS, NEED TO INVESTIGATE MAKING THESE LESS BAD |
126 | 114 | add_definitions(-D_FORTIFY_SOURCE=2) | 140 | add_definitions(-D_FORTIFY_SOURCE=2) |
127 | @@ -116,9 +142,11 @@ | |||
128 | 116 | add_definitions(-DHAVE_CONFIG_H) | 142 | add_definitions(-DHAVE_CONFIG_H) |
129 | 117 | add_definitions(-DHAVE_CAIRO_PDF=1) # needed for src/libnrtype/Layout-TNG.h | 143 | add_definitions(-DHAVE_CAIRO_PDF=1) # needed for src/libnrtype/Layout-TNG.h |
130 | 118 | add_definitions(-DHAVE_TR1_UNORDERED_SET) # XXX make an option! | 144 | add_definitions(-DHAVE_TR1_UNORDERED_SET) # XXX make an option! |
131 | 145 | |||
132 | 119 | if(NOT WIN32) | 146 | if(NOT WIN32) |
133 | 120 | add_definitions(-fPIC) | 147 | add_definitions(-fPIC) |
134 | 121 | endif() | 148 | endif() |
135 | 149 | |||
136 | 122 | # | 150 | # |
137 | 123 | # end badness | 151 | # end badness |
138 | 124 | # ----------------------------------------------------------------------------- | 152 | # ----------------------------------------------------------------------------- |
139 | @@ -156,27 +184,29 @@ | |||
140 | 156 | # ----------------------------------------------------------------------------- | 184 | # ----------------------------------------------------------------------------- |
141 | 157 | # Man pages | 185 | # Man pages |
142 | 158 | # ----------------------------------------------------------------------------- | 186 | # ----------------------------------------------------------------------------- |
164 | 159 | include("CMakeScripts/Pod2man.cmake") | 187 | if(UNIX) |
165 | 160 | 188 | include("CMakeScripts/Pod2man.cmake") | |
166 | 161 | # Load AUTHORS file contents into $INKSCAPE_AUTHORS | 189 | |
167 | 162 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS content) | 190 | # Load AUTHORS file contents into $INKSCAPE_AUTHORS |
168 | 163 | string(REGEX REPLACE "^([^\n#]+)\n" "\\1;\n" content_list "${content}") | 191 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS content) |
169 | 164 | join(INKSCAPE_AUTHORS "," "${content_list}") | 192 | string(REGEX REPLACE "^([^\n#]+)\n" "\\1;\n" content_list "${content}") |
170 | 165 | 193 | join(INKSCAPE_AUTHORS "," "${content_list}") | |
171 | 166 | foreach(podfile | 194 | |
172 | 167 | man/inkscape.pod | 195 | foreach(podfile |
173 | 168 | man/inkscape.de.pod | 196 | man/inkscape.pod |
174 | 169 | man/inkscape.el.pod | 197 | man/inkscape.de.pod |
175 | 170 | man/inkscape.fr.pod | 198 | man/inkscape.el.pod |
176 | 171 | man/inkscape.ja.pod | 199 | man/inkscape.fr.pod |
177 | 172 | man/inkscape.sk.pod | 200 | man/inkscape.ja.pod |
178 | 173 | man/inkscape.zh_TW.pod | 201 | man/inkscape.sk.pod |
179 | 174 | man/inkview.pod) | 202 | man/inkscape.zh_TW.pod |
180 | 175 | set(POD_IN ${CMAKE_CURRENT_SOURCE_DIR}/${podfile}.in) | 203 | man/inkview.pod) |
181 | 176 | set(POD_OUT ${CMAKE_CURRENT_BINARY_DIR}/${podfile}) | 204 | set(POD_IN ${CMAKE_CURRENT_SOURCE_DIR}/${podfile}.in) |
182 | 177 | configure_file(${POD_IN} ${POD_OUT}) | 205 | set(POD_OUT ${CMAKE_CURRENT_BINARY_DIR}/${podfile}) |
183 | 178 | pod2man(${POD_OUT} ${INKSCAPE_VERSION} 1 "Inkscape Commands Manual") | 206 | configure_file(${POD_IN} ${POD_OUT}) |
184 | 179 | endforeach() | 207 | pod2man(${POD_OUT} ${INKSCAPE_VERSION} 1 "Inkscape Commands Manual") |
185 | 208 | endforeach() | ||
186 | 209 | endif() | ||
187 | 180 | 210 | ||
188 | 181 | # ----------------------------------------------------------------------------- | 211 | # ----------------------------------------------------------------------------- |
189 | 182 | # Installation | 212 | # Installation |
190 | @@ -191,10 +221,185 @@ | |||
191 | 191 | 221 | ||
192 | 192 | # this should probably be done no matter what the platform is, just set SHARE_INSTALL first | 222 | # this should probably be done no matter what the platform is, just set SHARE_INSTALL first |
193 | 193 | add_subdirectory(share) | 223 | add_subdirectory(share) |
194 | 224 | elseif(WIN32) | ||
195 | 225 | SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/inkscape) | ||
196 | 226 | |||
197 | 227 | install(PROGRAMS | ||
198 | 228 | ${EXECUTABLE_OUTPUT_PATH}/inkscape.exe | ||
199 | 229 | ${EXECUTABLE_OUTPUT_PATH}/inkview.exe | ||
200 | 230 | DESTINATION ${CMAKE_INSTALL_PREFIX} | ||
201 | 231 | ) | ||
202 | 232 | |||
203 | 233 | install(FILES | ||
204 | 234 | ${LIBRARY_OUTPUT_PATH}/libinkscape_base.dll | ||
205 | 235 | ${LIBRARY_OUTPUT_PATH}/libgrid2.dll | ||
206 | 236 | DESTINATION ${CMAKE_INSTALL_PREFIX} | ||
207 | 237 | ) | ||
208 | 238 | |||
209 | 239 | # devlibs and mingw dlls | ||
210 | 240 | install(FILES | ||
211 | 241 | AUTHORS | ||
212 | 242 | COPYING | ||
213 | 243 | COPYING.LIB | ||
214 | 244 | NEWS | ||
215 | 245 | README | ||
216 | 246 | TRANSLATORS | ||
217 | 247 | ${DEVLIBS_BIN}/libatkmm-1.6-1.dll | ||
218 | 248 | ${DEVLIBS_BIN}/libglibmm-2.4-1.dll | ||
219 | 249 | ${DEVLIBS_BIN}/libgiomm-2.4-1.dll | ||
220 | 250 | ${DEVLIBS_BIN}/libgtkmm-2.4-1.dll | ||
221 | 251 | ${DEVLIBS_BIN}/libgdkmm-2.4-1.dll | ||
222 | 252 | ${DEVLIBS_BIN}/libpangomm-1.4-1.dll | ||
223 | 253 | ${DEVLIBS_BIN}/libcairomm-1.0-1.dll | ||
224 | 254 | ${DEVLIBS_BIN}/libsigc-2.0-0.dll | ||
225 | 255 | ${DEVLIBS_BIN}/libfreetype-6.dll | ||
226 | 256 | ${DEVLIBS_BIN}/libffi-6.dll | ||
227 | 257 | ${DEVLIBS_BIN}/libgc-1.dll | ||
228 | 258 | ${DEVLIBS_BIN}/libgsl-19.dll | ||
229 | 259 | ${DEVLIBS_BIN}/libgslcblas-0.dll | ||
230 | 260 | ${DEVLIBS_BIN}/libharfbuzz-0.dll | ||
231 | 261 | ${DEVLIBS_BIN}/liblzma-5.dll | ||
232 | 262 | ${DEVLIBS_BIN}/libaspell-15.dll | ||
233 | 263 | ${DEVLIBS_BIN}/libatk-1.0-0.dll | ||
234 | 264 | ${DEVLIBS_BIN}/libgdk-win32-2.0-0.dll | ||
235 | 265 | ${DEVLIBS_BIN}/libgdk_pixbuf-2.0-0.dll | ||
236 | 266 | ${DEVLIBS_BIN}/libglib-2.0-0.dll | ||
237 | 267 | ${DEVLIBS_BIN}/libgmodule-2.0-0.dll | ||
238 | 268 | ${DEVLIBS_BIN}/libgobject-2.0-0.dll | ||
239 | 269 | ${DEVLIBS_BIN}/libgtk-win32-2.0-0.dll | ||
240 | 270 | ${DEVLIBS_BIN}/libgthread-2.0-0.dll | ||
241 | 271 | ${DEVLIBS_BIN}/libgio-2.0-0.dll | ||
242 | 272 | ${DEVLIBS_BIN}/libcairo-2.dll | ||
243 | 273 | ${DEVLIBS_BIN}/libpixman-1-0.dll | ||
244 | 274 | ${DEVLIBS_BIN}/libpoppler-58.dll | ||
245 | 275 | ${DEVLIBS_BIN}/libpoppler-glib-8.dll | ||
246 | 276 | ${DEVLIBS_BIN}/libpangocairo-1.0-0.dll | ||
247 | 277 | ${DEVLIBS_BIN}/libpango-1.0-0.dll | ||
248 | 278 | ${DEVLIBS_BIN}/libpangoft2-1.0-0.dll | ||
249 | 279 | ${DEVLIBS_BIN}/libpangowin32-1.0-0.dll | ||
250 | 280 | ${DEVLIBS_BIN}/libfontconfig-1.dll | ||
251 | 281 | ${DEVLIBS_BIN}/libxml2-2.dll | ||
252 | 282 | ${DEVLIBS_BIN}/libxslt-1.dll | ||
253 | 283 | ${DEVLIBS_BIN}/libexslt-0.dll | ||
254 | 284 | ${DEVLIBS_BIN}/libexpat-1.dll | ||
255 | 285 | ${DEVLIBS_BIN}/librevenge-0.0.dll | ||
256 | 286 | ${DEVLIBS_BIN}/librevenge-stream-0.0.dll | ||
257 | 287 | ${DEVLIBS_BIN}/libwpg-0.3.dll | ||
258 | 288 | ${DEVLIBS_BIN}/libwpd-0.10.dll | ||
259 | 289 | ${DEVLIBS_BIN}/libvisio-0.1.dll | ||
260 | 290 | ${DEVLIBS_BIN}/libcdr-0.1.dll | ||
261 | 291 | ${DEVLIBS_BIN}/icuin56.dll | ||
262 | 292 | ${DEVLIBS_BIN}/icudt56.dll | ||
263 | 293 | ${DEVLIBS_BIN}/icuuc56.dll | ||
264 | 294 | ${DEVLIBS_BIN}/libjpeg-9.dll | ||
265 | 295 | ${DEVLIBS_BIN}/libpng16-16.dll | ||
266 | 296 | ${DEVLIBS_BIN}/libtiff-5.dll | ||
267 | 297 | ${DEVLIBS_BIN}/libexif-12.dll | ||
268 | 298 | ${DEVLIBS_BIN}/libcurl-4.dll | ||
269 | 299 | ${DEVLIBS_BIN}/zlib1.dll | ||
270 | 300 | ${DEVLIBS_BIN}/bz2-1.dll | ||
271 | 301 | ${DEVLIBS_BIN}/libiconv-2.dll | ||
272 | 302 | ${DEVLIBS_BIN}/libpopt-0.dll | ||
273 | 303 | ${DEVLIBS_BIN}/liblcms2-2.dll | ||
274 | 304 | ${DEVLIBS_BIN}/libMagick++-6.Q16-6.dll | ||
275 | 305 | ${DEVLIBS_BIN}/libMagickCore-6.Q16-2.dll | ||
276 | 306 | ${DEVLIBS_BIN}/libMagickWand-6.Q16-2.dll | ||
277 | 307 | ${DEVLIBS_BIN}/libintl-8.dll | ||
278 | 308 | ${DEVLIBS_BIN}/libpotrace-0.dll | ||
279 | 309 | ${MINGW_BIN}/libstdc++-6.dll | ||
280 | 310 | ${MINGW_BIN}/libwinpthread-1.dll | ||
281 | 311 | ${MINGW_BIN}/libgcc_s_seh-1.dll | ||
282 | 312 | ${MINGW_BIN}/libgomp-1.dll | ||
283 | 313 | DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
284 | 314 | |||
285 | 315 | # Setup application data directories, poppler files, locales, icons and themes | ||
286 | 316 | file(MAKE_DIRECTORY | ||
287 | 317 | data | ||
288 | 318 | doc | ||
289 | 319 | modules | ||
290 | 320 | plugins) | ||
291 | 321 | |||
292 | 322 | install(DIRECTORY | ||
293 | 323 | data | ||
294 | 324 | doc | ||
295 | 325 | modules | ||
296 | 326 | plugins | ||
297 | 327 | share | ||
298 | 328 | DESTINATION ${CMAKE_INSTALL_PREFIX} | ||
299 | 329 | PATTERN Adwaita EXCLUDE # NOTE: The theme is not used on Windows. | ||
300 | 330 | PATTERN hicolor/index.theme EXCLUDE # NOTE: Empty index.theme in hicolor icon theme causes SIGSEGV. | ||
301 | 331 | PATTERN CMakeLists.txt EXCLUDE | ||
302 | 332 | PATTERN *.am EXCLUDE) | ||
303 | 333 | |||
304 | 334 | install(DIRECTORY ${DEVLIBS_PATH}/share/themes | ||
305 | 335 | DESTINATION ${CMAKE_INSTALL_PREFIX}/share) | ||
306 | 336 | |||
307 | 337 | install(DIRECTORY ${DEVLIBS_PATH}/share/poppler | ||
308 | 338 | DESTINATION ${CMAKE_INSTALL_PREFIX}/share) | ||
309 | 339 | |||
310 | 340 | install(DIRECTORY ${DEVLIBS_PATH}/etc/fonts | ||
311 | 341 | DESTINATION ${CMAKE_INSTALL_PREFIX}/etc) | ||
312 | 194 | 342 | ||
313 | 343 | install(DIRECTORY ${DEVLIBS_PATH}/share/locale | ||
314 | 344 | DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
315 | 345 | |||
316 | 346 | install(DIRECTORY ${DEVLIBS_PATH}/etc/gtk-2.0 | ||
317 | 347 | DESTINATION ${CMAKE_INSTALL_PREFIX}/etc) | ||
318 | 348 | |||
319 | 349 | # GTK 2.0 | ||
320 | 350 | install(DIRECTORY ${DEVLIBS_LIB}/gtk-2.0 | ||
321 | 351 | DESTINATION ${CMAKE_INSTALL_PREFIX}/lib | ||
322 | 352 | FILES_MATCHING | ||
323 | 353 | PATTERN "*.dll" | ||
324 | 354 | PATTERN "*.cache") | ||
325 | 355 | |||
326 | 356 | install(DIRECTORY ${DEVLIBS_LIB}/gdk-pixbuf-2.0 | ||
327 | 357 | DESTINATION ${CMAKE_INSTALL_PREFIX}/lib | ||
328 | 358 | FILES_MATCHING | ||
329 | 359 | PATTERN "*.dll" | ||
330 | 360 | PATTERN "*.cache") | ||
331 | 361 | |||
332 | 362 | # Aspell dictionaries | ||
333 | 363 | install(DIRECTORY ${DEVLIBS_LIB}/aspell-0.60 | ||
334 | 364 | DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) | ||
335 | 365 | |||
336 | 366 | # Necessary to run extensions on windows if it is not in the path | ||
337 | 367 | if (CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64") | ||
338 | 368 | install(FILES | ||
339 | 369 | ${DEVLIBS_BIN}/gspawn-win64-helper.exe | ||
340 | 370 | ${DEVLIBS_BIN}/gspawn-win64-helper-console.exe | ||
341 | 371 | DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
342 | 372 | else() | ||
343 | 373 | install(FILES | ||
344 | 374 | ${DEVLIBS_BIN}/gspawn-win32-helper.exe | ||
345 | 375 | ${DEVLIBS_BIN}/gspawn-win32-helper-console.exe | ||
346 | 376 | DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
347 | 377 | endif() | ||
348 | 378 | |||
349 | 379 | # Perl | ||
350 | 380 | install(FILES | ||
351 | 381 | ${DEVLIBS_PATH}/perl/bin/perl58.dll | ||
352 | 382 | DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
353 | 383 | |||
354 | 384 | # Python | ||
355 | 385 | install(FILES | ||
356 | 386 | ${DEVLIBS_PATH}/python/python.exe | ||
357 | 387 | ${DEVLIBS_PATH}/python/pythonw.exe | ||
358 | 388 | ${DEVLIBS_PATH}/python/python27.dll | ||
359 | 389 | DESTINATION ${CMAKE_INSTALL_PREFIX}/python) | ||
360 | 390 | |||
361 | 391 | install(DIRECTORY ${DEVLIBS_PATH}/python/lib | ||
362 | 392 | DESTINATION ${CMAKE_INSTALL_PREFIX}/python) | ||
363 | 393 | |||
364 | 394 | install(DIRECTORY ${DEVLIBS_PATH}/python/dlls | ||
365 | 395 | DESTINATION ${CMAKE_INSTALL_PREFIX}/python) | ||
366 | 195 | else() | 396 | else() |
367 | 397 | <<<<<<< TREE | ||
368 | 196 | # TODO, WIN32, APPLE/OSX, MinGW | 398 | # TODO, WIN32, APPLE/OSX, MinGW |
369 | 197 | 399 | ||
370 | 400 | ======= | ||
371 | 401 | # TODO: Mac OS X | ||
372 | 402 | >>>>>>> MERGE-SOURCE | ||
373 | 198 | endif() | 403 | endif() |
374 | 199 | 404 | ||
375 | 200 | # ----------------------------------------------------------------------------- | 405 | # ----------------------------------------------------------------------------- |
376 | @@ -245,6 +450,13 @@ | |||
377 | 245 | message("CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") | 450 | message("CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") |
378 | 246 | message("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") | 451 | message("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") |
379 | 247 | message("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") | 452 | message("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") |
380 | 453 | |||
381 | 454 | if(WIN32) | ||
382 | 455 | message("CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") | ||
383 | 456 | message("CMAKE_FIND_LIBRARY_PREFIXES: ${CMAKE_FIND_LIBRARY_PREFIXES}") | ||
384 | 457 | message("CMAKE_FIND_LIBRARY_SUFFIXES: ${CMAKE_FIND_LIBRARY_SUFFIXES}") | ||
385 | 458 | endif() | ||
386 | 459 | |||
387 | 248 | message("") | 460 | message("") |
388 | 249 | 461 | ||
389 | 250 | # dependency info | 462 | # dependency info |
390 | @@ -263,4 +475,23 @@ | |||
391 | 263 | message("WITH_NLS: ${WITH_NLS}") | 475 | message("WITH_NLS: ${WITH_NLS}") |
392 | 264 | message("WITH_OPENMP: ${WITH_OPENMP}") | 476 | message("WITH_OPENMP: ${WITH_OPENMP}") |
393 | 265 | message("WITH_PROFILING: ${WITH_PROFILING}") | 477 | message("WITH_PROFILING: ${WITH_PROFILING}") |
394 | 478 | |||
395 | 479 | message("") | ||
396 | 480 | |||
397 | 481 | if(WIN32) | ||
398 | 482 | message("HAVE_MINGW: ${HAVE_MINGW}") | ||
399 | 483 | message("HAVE_MINGW64: ${HAVE_MINGW64}") | ||
400 | 484 | message("MINGW_PATH: ${MINGW_PATH}") | ||
401 | 485 | message("MINGW_ARCH: ${MINGW_ARCH}") | ||
402 | 486 | message("MINGW_ARCH_PATH: ${MINGW_ARCH_PATH}") | ||
403 | 487 | message("MINGW64_INCLUDE: ${MINGW64_INCLUDE}") | ||
404 | 488 | message("MINGW64_LIB: ${MINGW64_LIB}") | ||
405 | 489 | message("DEVLIBS_PATH: ${DEVLIBS_PATH}") | ||
406 | 490 | message("DEVLIBS_LIB: ${DEVLIBS_LIB}") | ||
407 | 491 | message("DEVLIBS_BIN: ${DEVLIBS_BIN}") | ||
408 | 492 | message("PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}") | ||
409 | 493 | message("GS_PATH ${GS_PATH}") | ||
410 | 494 | message("GS_BIN ${GS_BIN}") | ||
411 | 495 | endif() | ||
412 | 496 | |||
413 | 266 | message("------------------------------------------------------------------------") | 497 | message("------------------------------------------------------------------------") |
414 | 267 | 498 | ||
415 | === modified file 'CMakeScripts/ConfigPaths.cmake' | |||
416 | --- CMakeScripts/ConfigPaths.cmake 2016-01-17 07:05:58 +0000 | |||
417 | +++ CMakeScripts/ConfigPaths.cmake 2016-06-28 06:54:18 +0000 | |||
418 | @@ -1,9 +1,153 @@ | |||
419 | 1 | message(STATUS "Creating build files in: ${CMAKE_CURRENT_BINARY_DIR}") | 1 | message(STATUS "Creating build files in: ${CMAKE_CURRENT_BINARY_DIR}") |
420 | 2 | 2 | ||
421 | 3 | if(WIN32) | 3 | if(WIN32) |
422 | 4 | # Directory containing the precompiled Inkscape libraries. Usually c:\devlibs or c:\devlibs64 | ||
423 | 5 | set(DEVLIBS_PATH C:/devlibs64) | ||
424 | 6 | |||
425 | 7 | # Directory containing the MinGW instance used for compilation. Usually c:\mingw or c:\mingw64 | ||
426 | 8 | set(MINGW_PATH C:/mingw64) | ||
427 | 9 | |||
428 | 10 | # Directory containing the Ghostscript installation. | ||
429 | 11 | set(GS_PATH C:/latex/gs/gs8.61) | ||
430 | 12 | |||
431 | 13 | # Normalize directory separator slashes. | ||
432 | 14 | string(REGEX REPLACE "\\\\" "/" DEVLIBS_PATH ${DEVLIBS_PATH}) | ||
433 | 15 | string(REGEX REPLACE "\\\\" "/" MINGW_PATH ${MINGW_PATH}) | ||
434 | 16 | string(REGEX REPLACE "\\\\" "/" GS_PATH ${GS_PATH}) | ||
435 | 17 | |||
436 | 18 | # =============== DEVLIBS CHECKS =============== | ||
437 | 19 | |||
438 | 20 | # Directory containing the compile time .dll.a and .a files. | ||
439 | 21 | set(DEVLIBS_LIB "${DEVLIBS_PATH}/lib") | ||
440 | 22 | |||
441 | 23 | if(NOT EXISTS "${DEVLIBS_LIB}") | ||
442 | 24 | message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_LIB}") | ||
443 | 25 | endif() | ||
444 | 26 | |||
445 | 27 | # Add devlibs libraries to linker path. | ||
446 | 28 | link_directories(${DEVLIBS_LIB}) | ||
447 | 29 | |||
448 | 30 | set(DEVLIBS_INCLUDE ${DEVLIBS_PATH}/include) | ||
449 | 31 | |||
450 | 32 | if(NOT EXISTS ${DEVLIBS_INCLUDE}) | ||
451 | 33 | message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_INCLUDE}") | ||
452 | 34 | endif() | ||
453 | 35 | |||
454 | 36 | # Add general MinGW headers to compiler include path. | ||
455 | 37 | #include_directories(${DEVLIBS_INCLUDE}) | ||
456 | 38 | |||
457 | 39 | # Directory containing the precompiled .dll files. | ||
458 | 40 | set(DEVLIBS_BIN ${DEVLIBS_PATH}/bin) | ||
459 | 41 | |||
460 | 42 | if(NOT EXISTS ${DEVLIBS_BIN}) | ||
461 | 43 | message(FATAL_ERROR "Inkscape development binaries directory does not exist: ${DEVLIBS_BIN}") | ||
462 | 44 | endif() | ||
463 | 45 | |||
464 | 46 | # Directory containing the pkgconfig .pc files. | ||
465 | 47 | set(PKG_CONFIG_PATH "${DEVLIBS_PATH}/lib/pkgconfig") | ||
466 | 48 | |||
467 | 49 | if(NOT EXISTS "${PKG_CONFIG_PATH}") | ||
468 | 50 | message(FATAL_ERROR "pkgconfig directory does not exist: ${PKG_CONFIG_PATH}") | ||
469 | 51 | endif() | ||
470 | 52 | |||
471 | 53 | # Add the devlibs directories to the paths used to find libraries and programs. | ||
472 | 54 | list(APPEND CMAKE_PREFIX_PATH ${DEVLIBS_PATH}) | ||
473 | 55 | |||
474 | 56 | # =============== MINGW CHECKS =============== | ||
475 | 57 | |||
476 | 58 | # We are in a MinGW environment. | ||
477 | 59 | set(HAVE_MINGW ON) | ||
478 | 60 | |||
479 | 61 | # Try to determine the MinGW processor architecture. | ||
480 | 62 | if(EXISTS ${MINGW_PATH}/mingw32) | ||
481 | 63 | set(HAVE_MINGW64 OFF) | ||
482 | 64 | set(MINGW_ARCH mingw32) | ||
483 | 65 | elseif(EXISTS ${MINGW_PATH}/x86_64-w64-mingw32) | ||
484 | 66 | set(HAVE_MINGW64 ON) | ||
485 | 67 | set(MINGW_ARCH x86_64-w64-mingw32) | ||
486 | 68 | else() | ||
487 | 69 | message(FATAL_ERROR "Unable to determine MinGW processor architecture. Are you using an unsupported MinGW version?") | ||
488 | 70 | endif() | ||
489 | 71 | |||
490 | 72 | # Path to processor architecture specific binaries and libs. | ||
491 | 73 | set(MINGW_ARCH_PATH ${MINGW_PATH}/${MINGW_ARCH}) | ||
492 | 74 | |||
493 | 75 | set(MINGW_BIN ${MINGW_PATH}/bin) | ||
494 | 76 | |||
495 | 77 | if(NOT EXISTS ${MINGW_BIN}) | ||
496 | 78 | message(FATAL_ERROR "MinGW binary directory does not exist: ${MINGW_BIN}") | ||
497 | 79 | endif() | ||
498 | 80 | |||
499 | 81 | set(MINGW_LIB ${MINGW_PATH}/lib) | ||
500 | 82 | |||
501 | 83 | if(NOT EXISTS ${MINGW_LIB}) | ||
502 | 84 | message(FATAL_ERROR "MinGW library directory does not exist: ${MINGW_LIB}") | ||
503 | 85 | endif() | ||
504 | 86 | |||
505 | 87 | # Add MinGW libraries to linker path. | ||
506 | 88 | link_directories(${MINGW_LIB}) | ||
507 | 89 | |||
508 | 90 | set(MINGW_INCLUDE ${MINGW_PATH}/include) | ||
509 | 91 | |||
510 | 92 | if(NOT EXISTS ${MINGW_INCLUDE}) | ||
511 | 93 | message(FATAL_ERROR "MinGW include directory does not exist: ${MINGW_INCLUDE}") | ||
512 | 94 | endif() | ||
513 | 95 | |||
514 | 96 | # Add general MinGW headers to compiler include path. | ||
515 | 97 | include_directories(${MINGW_INCLUDE}) | ||
516 | 98 | |||
517 | 99 | if(HAVE_MINGW64) | ||
518 | 100 | set(MINGW64_LIB ${MINGW_ARCH_PATH}/lib) | ||
519 | 101 | |||
520 | 102 | if(NOT EXISTS ${MINGW64_LIB}) | ||
521 | 103 | message(FATAL_ERROR "MinGW 64-Bit libraries directory does not exist: ${MINGW64_LIB}") | ||
522 | 104 | endif() | ||
523 | 105 | |||
524 | 106 | # Add 64-Bit libraries to linker path. | ||
525 | 107 | link_directories(${MINGW64_LIB}) | ||
526 | 108 | |||
527 | 109 | set(MINGW64_INCLUDE ${MINGW_ARCH_PATH}/include) | ||
528 | 110 | |||
529 | 111 | if(NOT EXISTS ${MINGW64_INCLUDE}) | ||
530 | 112 | message(FATAL_ERROR "MinGW 64-Bit include directory does not exist: ${MINGW64_INCLUDE}") | ||
531 | 113 | endif() | ||
532 | 114 | |||
533 | 115 | set(MINGW64_INCLUDE_SDL ${MINGW64_INCLUDE}/c++) | ||
534 | 116 | |||
535 | 117 | if(NOT EXISTS ${MINGW64_INCLUDE_SDL}) | ||
536 | 118 | message(FATAL_ERROR "MinGW 64-Bit SDL include directory does not exist: ${MINGW64_INCLUDE_SDL}") | ||
537 | 119 | endif() | ||
538 | 120 | |||
539 | 121 | # Add 64-Bit MinGW headers to compiler include path. | ||
540 | 122 | include_directories(${MINGW64_INCLUDE}) | ||
541 | 123 | #include_directories(${MINGW64_INCLUDE_SDL}) | ||
542 | 124 | endif() | ||
543 | 125 | |||
544 | 126 | # =============== GHOSTSCRIPT CHECKS =============== | ||
545 | 127 | |||
546 | 128 | # Check for Ghostscript. | ||
547 | 129 | set(GS_BIN "${GS_PATH}/bin") | ||
548 | 130 | |||
549 | 131 | if(EXISTS "${GS_BIN}") | ||
550 | 132 | set(HAVE_GS_BIN ON) | ||
551 | 133 | else() | ||
552 | 134 | set(HAVE_GS_BIN OFF) | ||
553 | 135 | endif() | ||
554 | 136 | |||
555 | 137 | # =============== LIBRARY AND LINKER =============== | ||
556 | 138 | |||
557 | 139 | # Tweak CMake into using Unix-style library names. | ||
558 | 140 | set(CMAKE_FIND_LIBRARY_PREFIXES "lib") | ||
559 | 141 | set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".dll") | ||
560 | 142 | |||
561 | 143 | if(NOT HAVE_MINGW64) | ||
562 | 144 | list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".a") | ||
563 | 145 | endif() | ||
564 | 146 | |||
565 | 147 | # Directory containing the current locale (translations). | ||
566 | 4 | set(PACKAGE_LOCALE_DIR "locale") | 148 | set(PACKAGE_LOCALE_DIR "locale") |
567 | 5 | set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") | 149 | set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") |
569 | 6 | else(WIN32) | 150 | elseif(UNIX) |
570 | 7 | # TODO: check and change this to correct value: | 151 | # TODO: check and change this to correct value: |
571 | 8 | if(NOT PACKAGE_LOCALE_DIR) | 152 | if(NOT PACKAGE_LOCALE_DIR) |
572 | 9 | set(PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale") # packagers might overwrite this | 153 | set(PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale") # packagers might overwrite this |
573 | @@ -13,4 +157,4 @@ | |||
574 | 13 | set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") | 157 | set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") |
575 | 14 | endif(NOT SHARE_INSTALL) | 158 | endif(NOT SHARE_INSTALL) |
576 | 15 | mark_as_advanced(SHARE_INSTALL) | 159 | mark_as_advanced(SHARE_INSTALL) |
578 | 16 | endif(WIN32) | 160 | endif() |
579 | 17 | 161 | ||
580 | === modified file 'CMakeScripts/DefineDependsandFlags.cmake' | |||
581 | --- CMakeScripts/DefineDependsandFlags.cmake 2016-06-09 09:03:26 +0000 | |||
582 | +++ CMakeScripts/DefineDependsandFlags.cmake 2016-06-28 06:54:18 +0000 | |||
583 | @@ -15,72 +15,27 @@ | |||
584 | 15 | # Files we include | 15 | # Files we include |
585 | 16 | # ---------------------------------------------------------------------------- | 16 | # ---------------------------------------------------------------------------- |
586 | 17 | if(WIN32) | 17 | if(WIN32) |
653 | 18 | message("---------------- BEGIN: Win32 ----------------") | 18 | # Set the link and include directories |
654 | 19 | 19 | get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) | |
655 | 20 | # The name of the target operating system | 20 | |
656 | 21 | set(CMAKE_SYSTEM_NAME Windows) | 21 | # MinGW supplied STL does not define these floating point constants.. :/ |
657 | 22 | 22 | add_definitions(-DFLT_EPSILON=1e-9) | |
658 | 23 | message("CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME}) | 23 | add_definitions(-DFLT_MAX=1e+37) |
659 | 24 | 24 | add_definitions(-DFLT_MIN=1e-37) | |
660 | 25 | set(CMAKE_C_COMPILER gcc) | 25 | |
661 | 26 | set(CMAKE_CXX_COMPILER g++) | 26 | list(APPEND INKSCAPE_LIBS "-lmscms") |
662 | 27 | set(CMAKE_RC_COMPILER windres) | 27 | |
663 | 28 | 28 | list(APPEND INKSCAPE_CXX_FLAGS "-mwindows") | |
664 | 29 | # Adjust the command line parameters for windres to the verion of MinGW. | 29 | list(APPEND INKSCAPE_CXX_FLAGS "-mthreads") |
665 | 30 | set(CMAKE_RC_COMPILER_INIT windres) | 30 | |
666 | 31 | enable_language(RC) | 31 | if(HAVE_MINGW64) |
667 | 32 | set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -i <SOURCE> -o <OBJECT>") | 32 | list(APPEND INKSCAPE_LIBS "-lgomp") |
668 | 33 | 33 | list(APPEND INKSCAPE_LIBS "-lwinpthread") | |
669 | 34 | # Here is the target environment located | 34 | |
670 | 35 | set(CMAKE_FIND_ROOT_PATH $ENV{MINGW_PATH}/) | 35 | list(APPEND INKSCAPE_CXX_FLAGS "-m64") |
671 | 36 | 36 | else() | |
672 | 37 | message("CMAKE_FIND_ROOT_PATH: " ${CMAKE_FIND_ROOT_PATH}) | 37 | list(APPEND INKSCAPE_CXX_FLAGS "-m32") |
673 | 38 | 38 | endif() | |
608 | 39 | # Tweak CMake into using Unix-style library names. | ||
609 | 40 | set(CMAKE_FIND_LIBRARY_PREFIXES "lib") | ||
610 | 41 | set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".dll") | ||
611 | 42 | |||
612 | 43 | message("CMAKE_FIND_LIBRARY_PREFIXES: " ${CMAKE_FIND_LIBRARY_PREFIXES}) | ||
613 | 44 | message("CMAKE_FIND_LIBRARY_SUFFIXES: " ${CMAKE_FIND_LIBRARY_SUFFIXES}) | ||
614 | 45 | |||
615 | 46 | set(SDL_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}x86_64-w64-mingw32/include/c++) | ||
616 | 47 | |||
617 | 48 | message("SDL_INCLUDE_DIR: " ${SDL_INCLUDE_DIR}) | ||
618 | 49 | |||
619 | 50 | #if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64") | ||
620 | 51 | link_directories($ENV{MINGW_PATH}/lib) | ||
621 | 52 | link_directories($ENV{DEVLIBS_PATH}/lib) | ||
622 | 53 | link_directories($ENV{MINGW_PATH}/x86_64-w64-mingw32/lib) | ||
623 | 54 | link_directories($ENV{WINDIR}/system32) | ||
624 | 55 | |||
625 | 56 | include_directories($ENV{MINGW_PATH}/include) | ||
626 | 57 | |||
627 | 58 | include_directories($ENV{MINGW_PATH}/x86_64-w64-mingw32/include) | ||
628 | 59 | include_directories($ENV{MINGW_PATH}/x86_64-w64-mingw32/include/c++) | ||
629 | 60 | #endif () | ||
630 | 61 | |||
631 | 62 | get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) | ||
632 | 63 | |||
633 | 64 | foreach(dir ${dirs}) | ||
634 | 65 | message("CMAKE_INCLUDE_DIR:" ${dir}) | ||
635 | 66 | endforeach() | ||
636 | 67 | |||
637 | 68 | add_definitions(-DFLT_EPSILON=1e-9) | ||
638 | 69 | add_definitions(-DFLT_MAX=1e+37) | ||
639 | 70 | add_definitions(-DFLT_MIN=1e-37) | ||
640 | 71 | |||
641 | 72 | list(APPEND INKSCAPE_LIBS "-lgomp") | ||
642 | 73 | list(APPEND INKSCAPE_LIBS "-lwinpthread") | ||
643 | 74 | list(APPEND INKSCAPE_LIBS "-lmscms") | ||
644 | 75 | |||
645 | 76 | list(APPEND INKSCAPE_CXX_FLAGS "-mwindows") | ||
646 | 77 | list(APPEND INKSCAPE_CXX_FLAGS "-mthreads") | ||
647 | 78 | list(APPEND INKSCAPE_CXX_FLAGS "-m64") | ||
648 | 79 | |||
649 | 80 | # Try to compile using C++ 11. | ||
650 | 81 | set(CMAKE_CXX_STANDARD 11) | ||
651 | 82 | |||
652 | 83 | message("---------------- END: Win32 ----------------") | ||
674 | 84 | endif() | 39 | endif() |
675 | 85 | 40 | ||
676 | 86 | pkg_check_modules(INKSCAPE_DEP REQUIRED pangocairo pangoft2 fontconfig gthread-2.0 gsl gmodule-2.0) | 41 | pkg_check_modules(INKSCAPE_DEP REQUIRED pangocairo pangoft2 fontconfig gthread-2.0 gsl gmodule-2.0) |
677 | 87 | 42 | ||
678 | === added directory 'build' | |||
679 | === added file 'build/configure.bat' | |||
680 | --- build/configure.bat 1970-01-01 00:00:00 +0000 | |||
681 | +++ build/configure.bat 2016-06-28 06:54:18 +0000 | |||
682 | @@ -0,0 +1,9 @@ | |||
683 | 1 | REM Delete the CMake cache. Needed when changes on the CMakeLists should be applied in a consistent way. | ||
684 | 2 | del CMakeCache.txt | ||
685 | 3 | rmdir /s /q CMakeFiles | ||
686 | 4 | |||
687 | 5 | REM Reset the console colors just in case CMake screwed them up again. | ||
688 | 6 | Color 07 | ||
689 | 7 | |||
690 | 8 | REM Configure using the MinGW compiler chain. | ||
691 | 9 | cmake .. -G "MinGW Makefiles" | ||
692 | 0 | \ No newline at end of file | 10 | \ No newline at end of file |
693 | 1 | 11 | ||
694 | === added file 'build/touch.bat' | |||
695 | --- build/touch.bat 1970-01-01 00:00:00 +0000 | |||
696 | +++ build/touch.bat 2016-06-28 06:54:18 +0000 | |||
697 | @@ -0,0 +1,4 @@ | |||
698 | 1 | REM NOTE: Use this command to significantly speed up compilation when changing the CMake config. | ||
699 | 2 | |||
700 | 3 | REM Updating the modification date of object files so they do not need to be recompiled.. | ||
701 | 4 | forfiles /s /m *.obj /c "cmd /c copy /b @path +,," | ||
702 | 0 | \ No newline at end of file | 5 | \ No newline at end of file |
703 | 1 | 6 | ||
704 | === modified file 'config.h.cmake' | |||
705 | --- config.h.cmake 2016-06-05 07:13:26 +0000 | |||
706 | +++ config.h.cmake 2016-06-28 06:54:18 +0000 | |||
707 | @@ -232,10 +232,18 @@ | |||
708 | 232 | #cmakedefine HAVE_ZLIB_H 1 | 232 | #cmakedefine HAVE_ZLIB_H 1 |
709 | 233 | 233 | ||
710 | 234 | /* Base data directory -- only path-prefix.h should use it! */ | 234 | /* Base data directory -- only path-prefix.h should use it! */ |
711 | 235 | #ifdef WIN32 | ||
712 | 236 | #define INKSCAPE_DATADIR "" | ||
713 | 237 | #else | ||
714 | 235 | #define INKSCAPE_DATADIR "${CMAKE_INSTALL_PREFIX}/share" | 238 | #define INKSCAPE_DATADIR "${CMAKE_INSTALL_PREFIX}/share" |
715 | 239 | #endif | ||
716 | 236 | 240 | ||
717 | 237 | /* Base library directory -- only path-prefix.h should use it! */ | 241 | /* Base library directory -- only path-prefix.h should use it! */ |
718 | 242 | #ifdef WIN32 | ||
719 | 243 | #define INKSCAPE_LIBDIR "\\lib" | ||
720 | 244 | #else | ||
721 | 238 | #define INKSCAPE_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" | 245 | #define INKSCAPE_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" |
722 | 246 | #endif | ||
723 | 239 | 247 | ||
724 | 240 | /* Define to 1 if `lstat' dereferences a symlink specified with a trailing | 248 | /* Define to 1 if `lstat' dereferences a symlink specified with a trailing |
725 | 241 | slash. */ | 249 | slash. */ |
726 | 242 | 250 | ||
727 | === renamed file 'configure.bat' => 'configure.bat.THIS' | |||
728 | === modified file 'mingwenv.bat' | |||
729 | --- mingwenv.bat 2014-07-28 20:11:22 +0000 | |||
730 | +++ mingwenv.bat 2016-06-28 06:54:18 +0000 | |||
731 | @@ -1,6 +1,6 @@ | |||
732 | 1 | @echo Setting environment variables for MinGw build of Inkscape | 1 | @echo Setting environment variables for MinGw build of Inkscape |
735 | 2 | IF "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=c:\devlibs | 2 | IF "%DEVLIBS_PATH%"=="" set DEVLIBS_PATH=c:\devlibs64 |
736 | 3 | IF "%MINGW_PATH%"=="" set MINGW_PATH=c:\mingw | 3 | IF "%MINGW_PATH%"=="" set MINGW_PATH=c:\mingw64 |
737 | 4 | set MINGW_BIN=%MINGW_PATH%\bin | 4 | set MINGW_BIN=%MINGW_PATH%\bin |
738 | 5 | set PKG_CONFIG_PATH=%DEVLIBS_PATH%\lib\pkgconfig | 5 | set PKG_CONFIG_PATH=%DEVLIBS_PATH%\lib\pkgconfig |
739 | 6 | set GS_BIN=C:\latex\gs\gs8.61\bin | 6 | set GS_BIN=C:\latex\gs\gs8.61\bin |
740 | 7 | 7 | ||
741 | === modified file 'src/CMakeLists.txt' | |||
742 | --- src/CMakeLists.txt 2016-06-12 08:25:42 +0000 | |||
743 | +++ src/CMakeLists.txt 2016-06-28 06:54:18 +0000 | |||
744 | @@ -2,10 +2,6 @@ | |||
745 | 2 | # Define the main source | 2 | # Define the main source |
746 | 3 | # ----------------------------------------------------------------------------- | 3 | # ----------------------------------------------------------------------------- |
747 | 4 | 4 | ||
748 | 5 | set(main_SRC | ||
749 | 6 | main.cpp | ||
750 | 7 | ) | ||
751 | 8 | |||
752 | 9 | set(sp_SRC | 5 | set(sp_SRC |
753 | 10 | attribute-rel-css.cpp | 6 | attribute-rel-css.cpp |
754 | 11 | attribute-rel-svg.cpp | 7 | attribute-rel-svg.cpp |
755 | @@ -423,21 +419,6 @@ | |||
756 | 423 | version.h | 419 | version.h |
757 | 424 | ) | 420 | ) |
758 | 425 | 421 | ||
759 | 426 | if(WIN32) | ||
760 | 427 | list(APPEND inkscape_SRC | ||
761 | 428 | inkscape.rc | ||
762 | 429 | registrytool.cpp | ||
763 | 430 | #deptool.cpp | ||
764 | 431 | winconsole.cpp | ||
765 | 432 | winmain.cpp | ||
766 | 433 | |||
767 | 434 | # ------- | ||
768 | 435 | # Headers | ||
769 | 436 | registrytool.h | ||
770 | 437 | ) | ||
771 | 438 | endif() | ||
772 | 439 | |||
773 | 440 | |||
774 | 441 | # ----------------------------------------------------------------------------- | 422 | # ----------------------------------------------------------------------------- |
775 | 442 | # Generate version file | 423 | # Generate version file |
776 | 443 | # ----------------------------------------------------------------------------- | 424 | # ----------------------------------------------------------------------------- |
777 | @@ -505,8 +486,26 @@ | |||
778 | 505 | # ----------------------------------------------------------------------------- | 486 | # ----------------------------------------------------------------------------- |
779 | 506 | # Setup the executable | 487 | # Setup the executable |
780 | 507 | # ----------------------------------------------------------------------------- | 488 | # ----------------------------------------------------------------------------- |
783 | 508 | #add_inkscape_lib(sp_LIB "${sp_SRC}") | 489 | |
784 | 509 | #add_inkscape_lib(inkscape_LIB "${inkscape_SRC}") | 490 | if(WIN32) |
785 | 491 | # Sources for the inkscape executable on Windows. | ||
786 | 492 | set(main_SRC | ||
787 | 493 | registrytool.h | ||
788 | 494 | registrytool.cpp | ||
789 | 495 | main.cpp | ||
790 | 496 | winmain.cpp | ||
791 | 497 | #winconsole.cpp | ||
792 | 498 | ) | ||
793 | 499 | |||
794 | 500 | # Add the platform specific resource files (enabling the app icon). | ||
795 | 501 | if(${HAVE_MINGW64}) | ||
796 | 502 | list(APPEND main_SRC inkscape-x64.rc) | ||
797 | 503 | else() | ||
798 | 504 | list(APPEND main_SRC inkscape.rc) | ||
799 | 505 | endif() | ||
800 | 506 | else() | ||
801 | 507 | set(main_SRC main.cpp) | ||
802 | 508 | endif() | ||
803 | 510 | 509 | ||
804 | 511 | # Build everything except main and inkview.c in a shared library. | 510 | # Build everything except main and inkview.c in a shared library. |
805 | 512 | add_library(inkscape_base SHARED ${inkscape_SRC} ${sp_SRC}) | 511 | add_library(inkscape_base SHARED ${inkscape_SRC} ${sp_SRC}) |
806 | @@ -515,6 +514,18 @@ | |||
807 | 515 | add_executable(inkscape ${main_SRC} ) | 514 | add_executable(inkscape ${main_SRC} ) |
808 | 516 | add_executable(inkview inkview.cpp ) | 515 | add_executable(inkview inkview.cpp ) |
809 | 517 | 516 | ||
810 | 517 | <<<<<<< TREE | ||
811 | 518 | ======= | ||
812 | 519 | if(UNIX) | ||
813 | 520 | # message after building. | ||
814 | 521 | add_custom_command( | ||
815 | 522 | TARGET inkscape | ||
816 | 523 | POST_BUILD MAIN_DEPENDENCY inkscape | ||
817 | 524 | COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${CMAKE_INSTALL_PREFIX}' | ||
818 | 525 | ) | ||
819 | 526 | endif() | ||
820 | 527 | |||
821 | 528 | >>>>>>> MERGE-SOURCE | ||
822 | 518 | add_dependencies(inkscape inkscape_version) | 529 | add_dependencies(inkscape inkscape_version) |
823 | 519 | 530 | ||
824 | 520 | if(WITH_DBUS) | 531 | if(WITH_DBUS) |
825 | @@ -525,11 +536,9 @@ | |||
826 | 525 | # order from automake | 536 | # order from automake |
827 | 526 | #sp_LIB | 537 | #sp_LIB |
828 | 527 | #nrtype_LIB | 538 | #nrtype_LIB |
829 | 528 | |||
830 | 529 | #inkscape_LIB | 539 | #inkscape_LIB |
831 | 530 | #sp_LIB # annoying, we need both! | 540 | #sp_LIB # annoying, we need both! |
832 | 531 | nrtype_LIB # annoying, we need both! | 541 | nrtype_LIB # annoying, we need both! |
833 | 532 | |||
834 | 533 | croco_LIB | 542 | croco_LIB |
835 | 534 | avoid_LIB | 543 | avoid_LIB |
836 | 535 | cola_LIB | 544 | cola_LIB |
837 | @@ -548,15 +557,19 @@ | |||
838 | 548 | list (INSERT INKSCAPE_TARGET_LIBS 0 "gdl_LIB") | 557 | list (INSERT INKSCAPE_TARGET_LIBS 0 "gdl_LIB") |
839 | 549 | endif() | 558 | endif() |
840 | 550 | 559 | ||
844 | 551 | 560 | <<<<<<< TREE | |
845 | 552 | 561 | ||
846 | 553 | 562 | ||
847 | 563 | |||
848 | 564 | ======= | ||
849 | 565 | >>>>>>> MERGE-SOURCE | ||
850 | 554 | # Link the inkscape_base library against all external dependencies | 566 | # Link the inkscape_base library against all external dependencies |
851 | 555 | target_link_libraries(inkscape_base ${INKSCAPE_TARGET_LIBS}) | 567 | target_link_libraries(inkscape_base ${INKSCAPE_TARGET_LIBS}) |
852 | 556 | 568 | ||
853 | 557 | # Link inkscape and inkview against inkscape_base | 569 | # Link inkscape and inkview against inkscape_base |
854 | 558 | target_link_libraries(inkscape inkscape_base ) | 570 | target_link_libraries(inkscape inkscape_base ) |
855 | 559 | target_link_libraries(inkview inkscape_base) | 571 | target_link_libraries(inkview inkscape_base) |
856 | 572 | <<<<<<< TREE | ||
857 | 560 | 573 | ||
858 | 561 | #Define the installation | 574 | #Define the installation |
859 | 562 | install( | 575 | install( |
860 | @@ -567,3 +580,5 @@ | |||
861 | 567 | ) | 580 | ) |
862 | 568 | 581 | ||
863 | 569 | 582 | ||
864 | 583 | ======= | ||
865 | 584 | >>>>>>> MERGE-SOURCE | ||
866 | 570 | 585 | ||
867 | === removed file 'touch.bat' | |||
868 | --- touch.bat 2016-04-16 15:59:22 +0000 | |||
869 | +++ touch.bat 1970-01-01 00:00:00 +0000 | |||
870 | @@ -1,1 +0,0 @@ | |||
871 | 1 | forfiles /s /m *.obj /c "cmd /c copy /b @path +,," | ||
872 | 2 | \ No newline at end of file | 0 | \ No newline at end of file |
Just tried it on Windows 7 with the win32 build env (32-bit devlibs and TDM-GCC-4.6). Some comments (note that I'm a cmake newbie):
1. CMake doesn't use GS_BIN when already set (in my mingwenv.bat). It instead tries to add /bin to GS_PATH. Note that some files (pdf2ps.bat) in GS_PATH/lib need to be in GS_BIN too so that related extensions work as expected.
2. Why did you define DEVLIBS_PATH and MINGW_PATH in configure.bat? They are already defined in mingwenv.bat (with some additional paths).
3. I used -G "MSYS Makefiles" to run cmake from the MSYS shell. Cmake worked fine, but then 'make' failed when linking to the libinkscape_base shared library.
4. Then I tried -G "MinGW Makefiles" from a Windows console. Same linking problem.
That said, it's a very interesting improvement (I never managed to use cmake with the win32 build env. before!). Thanks!