CMakeLists.txt 1.42 KB
Newer Older
Julien Michel's avatar
Julien Michel committed
1
2
3
4
# Sources of non-templated classes.

FILE(GLOB OTBGui_SRCS "*.cxx" )

5
6
7
8

# To suppress "ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib" error on APPLE and SHARED configuration 
IF(APPLE AND BUILD_SHARED_LIBS)
      FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
9
        SET(CMAKE_SHARED_LINKER_FLAGS${c} "${CMAKE_SHARED_LINKER_FLAGS${c}};-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
10
11
12
13
      ENDFOREACH(c)
ENDIF(APPLE AND BUILD_SHARED_LIBS)


Julien Michel's avatar
Julien Michel committed
14
ADD_LIBRARY(OTBGui ${OTBGui_SRCS})
15
TARGET_LINK_LIBRARIES (OTBGui OTBCommon ${FLTK_LIBRARIES})
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
IF(OTB_LIBRARY_PROPERTIES)
  SET_TARGET_PROPERTIES(OTBGui PROPERTIES ${OTB_LIBRARY_PROPERTIES})
ENDIF(OTB_LIBRARY_PROPERTIES)

IF(NOT OTB_INSTALL_NO_LIBRARIES)
  INSTALL(TARGETS OTBGui
    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)

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}/Gui
32
    COMPONENT Development)
33
ENDIF(NOT OTB_INSTALL_NO_DEVELOPMENT)