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