Merge lp:~shlomif-gmail/inkscape/inkscape into lp:~inkscape.dev/inkscape/trunk

Proposed by Shlomi Fish
Status: Merged
Merge reported by: su_v
Merged at revision: not available
Proposed branch: lp:~shlomif-gmail/inkscape/inkscape
Merge into: lp:~inkscape.dev/inkscape/trunk
Diff against target: 170 lines (+80/-15)
5 files modified
CMakeLists.txt (+0/-6)
CMakeScripts/DefineDependsandFlags.cmake (+21/-7)
CMakeScripts/Modules/FindLCMS2.cmake (+38/-0)
config.h.cmake (+11/-1)
src/CMakeLists.txt (+10/-1)
To merge this branch: bzr merge lp:~shlomif-gmail/inkscape/inkscape
Reviewer Review Type Date Requested Status
Inkscape Developers Pending
Review via email: mp+217083@code.launchpad.net

Description of the change

This fixes the handling of LCMS / LCMS2 by the CMake build system.

To post a comment you must log in.
Revision history for this message
Liam P. White (liampwhite) wrote :

Should change branch status to merged.

Revision history for this message
su_v (suv-lp) wrote :

On 2014-05-11 17:01 +0100, Liam P. White wrote:
> Should change branch status to merged.

@Liam - could you please provide information about the revision in which
this branch was actually merged into trunk?

(I fail to find the changes proposed in the branch in current trunk)

lp:~shlomif-gmail/inkscape/inkscape updated
13305. By Shlomi Fish

Committed/merged.

13306. By Shlomi Fish

Foo.

13307. By Shlomi Fish

Merged.

13308. By Shlomi Fish

Foo.

13309. By Shlomi Fish

cmake fixes.

Revision history for this message
su_v (suv-lp) wrote :

Proposed fixes have been committed to trunk in r13764 and r13766.

Latest patch from related report bug #1378843:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13764
Missing file (not included in the patch):
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13766

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-10-30 00:53:33 +0000
3+++ CMakeLists.txt 2014-11-03 16:52:06 +0000
4@@ -104,12 +104,6 @@
5 if(UNIX)
6 # TODO: man, locale, icons
7
8- # message after building.
9- add_custom_command(
10- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
11- COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${CMAKE_INSTALL_PREFIX}'
12- )
13-
14 install(
15 PROGRAMS ${EXECUTABLE_OUTPUT_PATH}/inkscape
16 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
17
18=== modified file 'CMakeScripts/DefineDependsandFlags.cmake'
19--- CMakeScripts/DefineDependsandFlags.cmake 2014-03-27 01:33:44 +0000
20+++ CMakeScripts/DefineDependsandFlags.cmake 2014-11-03 16:52:06 +0000
21@@ -46,14 +46,23 @@
22 endif()
23
24 if(ENABLE_LCMS)
25- find_package(LCMS)
26- if(LCMS_FOUND)
27- list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS})
28- list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES})
29- add_definitions(${LCMS_DEFINITIONS})
30+ find_package(LCMS2)
31+ if(LCMS2_FOUND)
32+ list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
33+ list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
34+ add_definitions(${LCMS2_DEFINITIONS})
35+ SET (HAVE_LIBLCMS2 ON)
36 else()
37- set(ENABLE_LCMS OFF)
38- endif()
39+ find_package(LCMS)
40+ if(LCMS_FOUND)
41+ list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS})
42+ list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES})
43+ add_definitions(${LCMS_DEFINITIONS})
44+ SET (HAVE_LIBLCMS1 ON)
45+ else()
46+ SET (ENABLE_LCMS OFF)
47+ endif()
48+ endif()
49 endif()
50
51 find_package(BoehmGC REQUIRED)
52@@ -81,6 +90,10 @@
53 POPPLER_VERSION VERSION_EQUAL "0.12.2")
54 set(POPPLER_NEW_COLOR_SPACE_API ON)
55 endif()
56+ if(POPPLER_VERSION VERSION_GREATER "0.26.0" OR
57+ POPPLER_VERSION VERSION_EQUAL "0.26.0")
58+ set(POPPLER_EVEN_NEWER_COLOR_SPACE_API ON)
59+ endif()
60 if(POPPLER_VERSION VERSION_GREATER "0.15.1" OR
61 POPPLER_VERSION VERSION_EQUAL "0.15.1")
62 set(POPPLER_NEW_GFXPATCH ON)
63@@ -163,6 +176,7 @@
64 ${GTK2_CAIROMM_INCLUDE_DIR}
65 ${GTK2_CAIROMMCONFIG_INCLUDE_DIR} # <-- not in cmake 2.8.4
66 ${GTK2_GIOMM_INCLUDE_DIR}
67+ ${GTK2_GIOMMCONFIG_INCLUDE_DIR}
68 ${GTK2_SIGC++_INCLUDE_DIR}
69 ${GTK2_SIGC++CONFIG_INCLUDE_DIR}
70 )
71
72=== added file 'CMakeScripts/Modules/FindLCMS2.cmake'
73--- CMakeScripts/Modules/FindLCMS2.cmake 1970-01-01 00:00:00 +0000
74+++ CMakeScripts/Modules/FindLCMS2.cmake 2014-11-03 16:52:06 +0000
75@@ -0,0 +1,38 @@
76+# This file was taken from the openjpeg library:
77+#
78+# http://code.google.com/p/openjpeg/source/browse/trunk/cmake/FindLCMS2.cmake?r=1987
79+#
80+# Thanks!
81+
82+# - Find LCMS2 library
83+# Find the native LCMS2 includes and library
84+# Once done this will define
85+#
86+# LCMS2_INCLUDE_DIR - Where to find lcms2.h, etc.
87+# LCMS2_LIBRARIES - Libraries to link against to use LCMS2.
88+# LCMS2_FOUND - If false, do not try to use LCMS2.
89+#
90+# also defined, but not for general use are
91+# LCMS2_LIBRARY - Where to find the LCMS2 library.
92+
93+#=============================================================================
94+#=============================================================================
95+
96+find_path(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
97+
98+set(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
99+
100+find_library(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
101+
102+mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY)
103+
104+# handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
105+# all listed variables are TRUE
106+include(FindPackageHandleStandardArgs)
107+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
108+
109+if(LCMS2_FOUND)
110+set( LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR})
111+set( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
112+endif()
113+
114
115=== modified file 'config.h.cmake'
116--- config.h.cmake 2011-09-27 17:02:55 +0000
117+++ config.h.cmake 2014-11-03 16:52:06 +0000
118@@ -16,7 +16,10 @@
119 #cmakedefine ENABLE_BINRELOC 1
120
121 /* Use LittleCms color management */
122-#cmakedefine ENABLE_LCMS 1
123+#cmakedefine HAVE_LIBLCMS2 1
124+
125+/* Use LittleCms color management */
126+#cmakedefine HAVE_LIBLCMS1 1
127
128 /* always defined to indicate that i18n is enabled */
129 #cmakedefine ENABLE_NLS 1
130@@ -128,9 +131,16 @@
131 /* Use GfxFont from Poppler >= 0.8.3 */
132 #cmakedefine POPPLER_NEW_GFXFONT 1
133
134+/* Use new error API from Poppler >= 0.20.0 */
135+#cmakedefine POPPLER_NEW_ERRORAPI
136+
137 /* Use color space API from Poppler >= 0.12.2 */
138 #cmakedefine POPPLER_NEW_COLOR_SPACE_API 1
139
140+/* Use color space API from Poppler >= 0.26.0 */
141+#cmakedefine POPPLER_EVEN_NEWER_COLOR_SPACE_API 1
142+
143+
144 /* GfxPatch no longer uses GfxColor in >= 0.15.1 */
145 #cmakedefine POPPLER_NEW_GFXPATCH 1
146
147
148=== modified file 'src/CMakeLists.txt'
149--- src/CMakeLists.txt 2014-10-17 20:03:14 +0000
150+++ src/CMakeLists.txt 2014-11-03 16:52:06 +0000
151@@ -517,10 +517,19 @@
152 # make executable for INKSCAPE
153 add_executable(inkscape ${main_SRC} ${inkscape_SRC} ${sp_SRC})
154
155+if(UNIX)
156+# message after building.
157+add_custom_command(
158+ TARGET inkscape
159+ POST_BUILD MAIN_DEPENDENCY inkscape
160+ COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${CMAKE_INSTALL_PREFIX}'
161+)
162+endif()
163+
164 add_dependencies(inkscape inkscape_version)
165
166 target_link_libraries(inkscape
167- # order from automake
168+ # order from automake
169 #sp_LIB
170 nrtype_LIB
171