From a72fb0a1c5aee4fb673184e0a7b05fe4cb043ce5 Mon Sep 17 00:00:00 2001 From: OTB Bot <otbbot@orfeo-toolbox.org> Date: Tue, 22 Jul 2008 07:06:43 +0000 Subject: [PATCH] Ajout dans option CMAKE_EXE_LINKER lien pour eviter erreur link avec OpenGL en doublon --- Testing/Code/Gui/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Testing/Code/Gui/CMakeLists.txt b/Testing/Code/Gui/CMakeLists.txt index 5c429d5279..28e4532ac4 100644 --- a/Testing/Code/Gui/CMakeLists.txt +++ b/Testing/Code/Gui/CMakeLists.txt @@ -32,6 +32,14 @@ INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}") # ${TIFF_LIBRARY} +# To suppress "ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib" error on APPLE configuration +IF(APPLE) + FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO") + SET(CMAKE_EXE_LINKER_FLAGS${c} "${CMAKE_EXE_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) + + ADD_EXECUTABLE(otbGuiTests otbGuiTests.cxx ${Gui_SRCS}) TARGET_LINK_LIBRARIES(otbGuiTests OTBIO OTBGui OTBVisu OTBCommon gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon fltk) -- GitLab