[d14593]: CMakeLists.txt Maximize Restore History

Download this file

CMakeLists.txt    43 lines (32 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules )
project(libpanorama)
FIND_PACKAGE(BISON REQUIRED)
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)