[cmake] Link AppKit to avoid undefined references if OCC is statically linked on MacOS

This commit is contained in:
Matthias Hochsteger 2019-10-18 16:38:50 +02:00
parent 6b99cf3c21
commit 495a6eddf7

View File

@ -12,6 +12,11 @@ target_link_libraries(occ PUBLIC ngcore)
if(NOT WIN32)
target_link_libraries( occ PRIVATE ${OCC_LIBRARIES} ${PYTHON_LIBRARIES})
if(USE_OCC AND APPLE)
# Link AppKit in case OCE was built as static libraries
find_library(AppKit AppKit)
target_link_libraries( occ PRIVATE ${AppKit} )
endif(USE_OCC AND APPLE)
install( TARGETS occ ${NG_INSTALL_DIR})
if (USE_GUI)
target_link_libraries( occvis PUBLIC occ )