Commit 873306a4 authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

COMP: cmake correction for Mac OS X to suppress cmake warning (POLICY NEW conform)

parent e30c8693
...@@ -514,7 +514,7 @@ ENDIF(WIN32) ...@@ -514,7 +514,7 @@ ENDIF(WIN32)
IF(OTB_USE_VISU_GUI) IF(OTB_USE_VISU_GUI)
SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES};${FLTK_PLATFORM_DEPENDENT_LIBS}") SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES};${FLTK_PLATFORM_DEPENDENT_LIBS}")
IF(APPLE) IF(APPLE)
SET(OTB_VISU_GUI_LIBRARIES "${OTB_VISU_GUI_LIBRARIES} -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib ") SET(OTB_VISU_GUI_LIBRARIES "${OTB_VISU_GUI_LIBRARIES};-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
ENDIF(APPLE) ENDIF(APPLE)
ELSE(OTB_USE_VISU_GUI) ELSE(OTB_USE_VISU_GUI)
SET(OTB_VISU_GUI_LIBRARIES "") SET(OTB_VISU_GUI_LIBRARIES "")
......
...@@ -6,7 +6,7 @@ FILE(GLOB OTBGui_SRCS "*.cxx" ) ...@@ -6,7 +6,7 @@ FILE(GLOB OTBGui_SRCS "*.cxx" )
# To suppress "ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib" error on APPLE and SHARED configuration # 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) IF(APPLE AND BUILD_SHARED_LIBS)
FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO") FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
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") 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")
ENDFOREACH(c) ENDFOREACH(c)
ENDIF(APPLE AND BUILD_SHARED_LIBS) ENDIF(APPLE AND BUILD_SHARED_LIBS)
......
...@@ -27,8 +27,8 @@ INSTALL_TARGETS(/bin fluid) ...@@ -27,8 +27,8 @@ INSTALL_TARGETS(/bin fluid)
TARGET_LINK_LIBRARIES(fluid ${OTB_VISU_GUI_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS}) TARGET_LINK_LIBRARIES(fluid ${OTB_VISU_GUI_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS})
IF(OPENGL_FOUND) IF(OPENGL_FOUND)
TARGET_LINK_LIBRARIES(fluid fltk_gl) TARGET_LINK_LIBRARIES(fluid fltk_gl)
IF(APPLE) # IF(APPLE)
TARGET_LINK_LIBRARIES(fluid -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib) # TARGET_LINK_LIBRARIES(fluid -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib)
ENDIF(APPLE) # ENDIF(APPLE)
ENDIF(OPENGL_FOUND) ENDIF(OPENGL_FOUND)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment