Fixed compilation on OSX & Linux
This commit is contained in:
parent
7ef894e074
commit
58a0c41713
3 changed files with 9 additions and 10 deletions
|
@ -287,9 +287,5 @@ endif ()
|
|||
add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs)
|
||||
add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
||||
|
||||
#install(PROGRAMS slic3r.pl DESTINATION bin RENAME slic3r-prusa3d)
|
||||
|
||||
file(GLOB MyVar var/*.png)
|
||||
install(FILES ${MyVar} DESTINATION share/slic3r-prusa3d)
|
||||
install(FILES lib/Slic3r.pm DESTINATION lib/slic3r-prusa3d)
|
||||
install(DIRECTORY lib/Slic3r DESTINATION lib/slic3r-prusa3d)
|
||||
|
|
|
@ -36,11 +36,9 @@ else()
|
|||
add_subdirectory(png/zlib)
|
||||
set(ZLIB_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/png/zlib ${CMAKE_CURRENT_BINARY_DIR}/png/zlib)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
message(STATUS "ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIR}")
|
||||
add_subdirectory(png/libpng)
|
||||
set_target_properties(zlibstatic PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_target_properties(png_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
# target_include_directories(png_static PRIVATE ${ZLIB_INCLUDE_DIR})
|
||||
set(PNG_LIBRARIES png_static zlibstatic)
|
||||
set(PNG_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/png/libpng ${CMAKE_CURRENT_BINARY_DIR}/png/libpng)
|
||||
endif()
|
||||
|
@ -51,6 +49,13 @@ add_subdirectory(slic3r)
|
|||
# Create a slic3r executable
|
||||
add_executable(slic3r slic3r.cpp)
|
||||
target_link_libraries(slic3r libslic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES})
|
||||
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++)
|
||||
elseif (NOT MSVC)
|
||||
target_link_libraries(XS -lstdc++)
|
||||
endif ()
|
||||
# Add the OpenGL and GLU libraries.
|
||||
if (SLIC3R_GUI)
|
||||
if (MSVC)
|
||||
|
|
|
@ -97,7 +97,7 @@ if(SLIC3R_PROFILE)
|
|||
target_link_libraries(XS Shiny)
|
||||
endif()
|
||||
|
||||
target_include_directories(XS PRIVATE src src/libslic3r) # Local include directories
|
||||
target_include_directories(XS PRIVATE src)
|
||||
target_compile_definitions(XS PRIVATE -DSLIC3RXS)
|
||||
set_target_properties(XS PROPERTIES PREFIX "") # Prevent cmake from generating libXS.so instead of XS.so
|
||||
|
||||
|
@ -157,7 +157,7 @@ target_link_libraries(XS ${EXPAT_LIBRARIES})
|
|||
# target_link_libraries(XS ${GLEW_LIBRARIES})
|
||||
|
||||
# Install the XS.pm and XS.{so,dll,bundle} into the local-lib directory.
|
||||
set(PERL_LOCAL_LIB_DIR "../local-lib/lib/perl5/${PerlEmbed_ARCHNAME}")
|
||||
set(PERL_LOCAL_LIB_DIR "../../local-lib/lib/perl5/${PerlEmbed_ARCHNAME}")
|
||||
add_custom_command(
|
||||
TARGET XS
|
||||
POST_BUILD
|
||||
|
@ -175,8 +175,6 @@ if(APPLE)
|
|||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(XS PRIVATE src src/libslic3r)
|
||||
|
||||
if(SLIC3R_PROFILE)
|
||||
target_link_libraries(Shiny)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue