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

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

parent e30c8693
......@@ -514,7 +514,7 @@ ENDIF(WIN32)
IF(OTB_USE_VISU_GUI)
SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES};${FLTK_PLATFORM_DEPENDENT_LIBS}")
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)
ELSE(OTB_USE_VISU_GUI)
SET(OTB_VISU_GUI_LIBRARIES "")
......
......@@ -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
IF(APPLE AND BUILD_SHARED_LIBS)
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)
ENDIF(APPLE AND BUILD_SHARED_LIBS)
......
......@@ -27,8 +27,8 @@ INSTALL_TARGETS(/bin fluid)
TARGET_LINK_LIBRARIES(fluid ${OTB_VISU_GUI_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS})
IF(OPENGL_FOUND)
TARGET_LINK_LIBRARIES(fluid fltk_gl)
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)
ENDIF(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)
# ENDIF(APPLE)
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