Skip to content

Commit 87572f7

Browse files
committed
add framework path to link test to fix OS X SDK problem
1 parent fd15be3 commit 87572f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/FindOSGEARTH.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ IF( OSGEARTH_LIBRARY AND OSGEARTH_INCLUDE_DIR )
105105
SET(SAFE_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
106106
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OSGEARTH_INCLUDE_DIR})
107107
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OSGEARTHUTIL_LIBRARY})
108+
IF(APPLE)
109+
# no extra LDFLAGS used in link test, may fail in OS X SDK
110+
SET(CMAKE_REQUIRED_LIBRARIES "-F/Library/Frameworks" ${CMAKE_REQUIRED_LIBRARIES})
111+
ENDIF(APPLE)
108112
CHECK_CXX_SOURCE_COMPILES("
109113
#include <osgEarthUtil/Controls>
110114
using namespace osgEarth::Util::Controls;

0 commit comments

Comments
 (0)