CMake build system: Fixes for OSX.

This commit is contained in:
bubnikv 2017-08-18 16:59:36 +02:00
parent 3dbc93c663
commit e2a685b8bb

View File

@ -335,7 +335,7 @@ if (SLIC3R_GUI)
elseif (MINGW)
target_link_libraries(XS -lopengl32)
elseif (APPLE)
target_link_libraries(XS -framework OpenGL)
target_link_libraries(XS "-framework OpenGL")
else ()
target_link_libraries(XS -lGL -lGLU)
endif ()
@ -348,7 +348,7 @@ set_target_properties(XS PROPERTIES PREFIX "") # Prevent cmake from generating l
if (APPLE)
# add_compile_options(-stdlib=libc++)
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
target_link_libraries(XS -framework IOKit -framework CoreFoundation -lc++)
target_link_libraries(XS "-framework IOKit" "-framework CoreFoundation" -lc++)
elseif (MSVC)
target_link_libraries(XS )
else ()
@ -503,7 +503,7 @@ if(NOT SLIC3R_STATIC)
target_compile_definitions(slic3r PRIVATE -DBOOST_LOG_DYN_LINK)
endif()
if (APPLE)
target_link_libraries(slic3r -framework IOKit -framework CoreFoundation -lc++)
target_link_libraries(slic3r "-framework IOKit" "-framework CoreFoundation" -lc++)
elseif (NOT MSVC)
target_link_libraries(slic3r -lstdc++)
endif ()