CMakeLists.txt 1.77 KB
Newer Older
OTB Bot's avatar
OTB Bot committed
1
2
3
4
# Sources of non-templated classes.

FILE(GLOB OTBCommon_SRCS "*.cxx" )

5
6
7
8
IF( NOT OTB_USE_MAPNIK )
    LIST(REMOVE_ITEM OTBCommon_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbVectorDataStyle.cxx" )
ENDIF( NOT OTB_USE_MAPNIK )

Jordi Inglada's avatar
Jordi Inglada committed
9
IF( NOT OTB_USE_PQXX )
10
    LIST(REMOVE_ITEM OTBCommon_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbPostGISConnectionImplementation.cxx" )
Jordi Inglada's avatar
Jordi Inglada committed
11
12
13
ENDIF( NOT OTB_USE_PQXX )


OTB Bot's avatar
OTB Bot committed
14
ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS})
15
16
17
18
19
#Apparently not supported by opensolaris at least
#SET_TARGET_PROPERTIES(OTBCommon
#    PROPERTIES
#    LINK_INTERFACE_LIBRARIES ""
#)
20
TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon otbconfigfile)
21
IF(OTB_USE_MAPNIK)
22
    TARGET_LINK_LIBRARIES(OTBCommon ${MAPNIK_LIBRARY})
23
ENDIF(OTB_USE_MAPNIK)
24

25
IF(OTB_USE_PQXX)
Emmanuel Christophe's avatar
Emmanuel Christophe committed
26
    TARGET_LINK_LIBRARIES(OTBCommon ${PQ_LIBRARY} ${PQXX_LIBRARY})
Jordi Inglada's avatar
Jordi Inglada committed
27
28
ENDIF(OTB_USE_PQXX)

29
IF(OTB_I18N)
30
    TARGET_LINK_LIBRARIES(OTBCommon ${GETTEXT_LIBRARY})
31
32
33
    IF(APPLE OR WIN32)
       TARGET_LINK_LIBRARIES(OTBCommon ${GETTEXT_INTL_LIBRARY})
    ENDIF(APPLE OR WIN32)
34
ENDIF(OTB_I18N)
35

36
37
38
IF(OTB_LIBRARY_PROPERTIES)
  SET_TARGET_PROPERTIES(OTBCommon PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
OTB Bot's avatar
OTB Bot committed
39

40
41
42
43
44
45
IF(NOT OTB_INSTALL_NO_LIBRARIES)
  INSTALL(TARGETS OTBCommon
    RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
    LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
    ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT OTB_INSTALL_NO_LIBRARIES)
46

47
48
49
50
51
IF(NOT OTB_INSTALL_NO_DEVELOPMENT)
  FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
  FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
  INSTALL(FILES ${__files1} ${__files2}
    DESTINATION ${OTB_INSTALL_INCLUDE_DIR_CM24}/Common
52
    COMPONENT Development)
53
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)