Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /CMakeLists.txt [02a0eb] .. [d1eed7] Maximize Restore

  Switch to side-by-side view

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,37 @@
 FIND_PACKAGE(FLEX REQUIRED)
 FIND_PACKAGE(PkgConfig)
 
+
+# macro to convert a CMAKE list to a string
+MACRO(LIST2STRING alist astring)
+  FOREACH(elem ${${alist}})
+   SET(${astring} "${${astring}} ${elem}")
+  ENDFOREACH(elem)
+ENDMACRO(LIST2STRING) 
+
 # check for VIPS
 pkg_check_modules(VIPS vips-7.12)
 
+# convert CFLAGS_OTHER and LDFLAGS_OTHER to an ordinary string
+LIST2STRING(VIPS_CFLAGS_OTHER VIPS_CFLAGS_OTHER_STRING)
+LIST2STRING(VIPS_LDFLAGS_OTHER VIPS_LDFLAGS_OTHER_STRING)
+
+# set include and library directories to include all libraries
+# required by VIPS
+link_directories( ${VIPS_LIBRARY_DIRS} )
+include_directories( ${VIPS_INCLUDE_DIRS} )
+
+# always compile with -Wall
+IF(CMAKE_COMPILER_IS_GNUCC)
+  ADD_DEFINITIONS("-Wall")
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+
+#MESSAGE("VIPS_CFLAGS: ${VIPS_CFLAGS}")
+#MESSAGE("VIPS_CFLAGS_OTHER_STRING: ${VIPS_CFLAGS_OTHER_STRING}")
+#MESSAGE("VIPS_INCLUDE_DIRS: ${VIPS_INCLUDE_DIRS}")
+#MESSAGE("VIPS_LIBRARIES: ${VIPS_LIBRARIES}")
+#MESSAGE("VIPS_LIBRARY_DIRS: ${VIPS_LIBRARY_DIRS}")
+#MESSAGE("VIPS_LDFLAGS: ${VIPS_LDFLAGS}")
+#MESSAGE("VIPS_LDFLAGS_OTHER_STRING: ${VIPS_LDFLAGS_OTHER_STRING}")
+
 add_subdirectory(src)