CMakeLists.txt 2.48 KB
Newer Older
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1
2
3
4
# Sources of non-templated classes.

FILE(GLOB OTBIO_SRCS "*.cxx" )

5
IF(NOT OTB_COMPILE_JPEG2000)
6
7
8
    LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbJPEG2000ImageIO.cxx" )
    LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbJPEG2000ImageIOFactory.cxx" )
    ADD_DEFINITIONS(-DOTB_JPEG2000_DISABLED)
9
ENDIF(NOT OTB_COMPILE_JPEG2000)
10

11
IF( NOT OTB_USE_CURL )
Emmanuel Christophe's avatar
Emmanuel Christophe committed
12
13
    LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbTileMapImageIOFactory.cxx" )
    LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbTileMapImageIO.cxx" )
14
ENDIF( NOT OTB_USE_CURL )
Thomas Feuvrier's avatar
Thomas Feuvrier committed
15

16

17
# otbopenjpeg
18
IF(OTB_COMPILE_JPEG2000)
19
20
21
22
23
24
25
  IF(WIN32)
    IF(OTB_BUILD_SHARED_LIBS)
      ADD_DEFINITIONS(-DOPJ_EXPORTS)
    ELSE(OTB_BUILD_SHARED_LIBS)
      ADD_DEFINITIONS(-DOPJ_STATIC)
    ENDIF(OTB_BUILD_SHARED_LIBS)
  ENDIF(WIN32)
26
ENDIF(OTB_COMPILE_JPEG2000)
27

28

Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
29
ADD_LIBRARY(OTBIO ${OTBIO_SRCS})
30
TARGET_LINK_LIBRARIES (OTBIO OTBCommon ${GDAL_LIBRARY} ${OGR_LIBRARY} otbossim otbossimplugins ITKIO ITKCommon dxf otbkml otbliblas)
31
IF( OTB_COMPILE_JPEG2000 )
32
    TARGET_LINK_LIBRARIES (OTBIO otbopenjpeg)
33
ENDIF( OTB_COMPILE_JPEG2000 )
34

35
36
37
IF( OTB_USE_CURL )
    TARGET_LINK_LIBRARIES (OTBIO ${CURL_LIBRARY})
ENDIF( OTB_USE_CURL )
38
39
40
IF(OTB_LIBRARY_PROPERTIES)
  SET_TARGET_PROPERTIES(OTBIO PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
41

42
43
44
45
46
47
48

IF(NOT OTB_INSTALL_NO_LIBRARIES)
  INSTALL(TARGETS OTBIO
    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)
49
50
51
52

FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")

53
IF( NOT OTB_USE_CURL )
Emmanuel Christophe's avatar
Emmanuel Christophe committed
54
55
    LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbTileMapImageIOFactory.h" )
    LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbTileMapImageIO.h" )
56
ENDIF( NOT OTB_USE_CURL )
Thomas Feuvrier's avatar
Thomas Feuvrier committed
57

58

59
IF(NOT OTB_COMPILE_JPEG2000)
60
61
   LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbJpeg2000ImageIOFactory.h" )
   LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbJpeg2000ImageIO.h" )
62
ENDIF(NOT OTB_COMPILE_JPEG2000)
63

64
65
66
67
68
69

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}/IO
70
    COMPONENT Development)
71
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)
72