Build system tweaks to get rid of cmake and boost warnings.
This commit is contained in:
parent
9c46eed742
commit
96380180f4
@ -241,7 +241,7 @@ if(NOT WIN32)
|
|||||||
endif()
|
endif()
|
||||||
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS system filesystem thread log locale regex)
|
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS system filesystem thread log locale regex)
|
||||||
if(Boost_FOUND)
|
if(Boost_FOUND)
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
# include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# BOOST_ASIO_DISABLE_KQUEUE : prevents a Boost ASIO bug on OS X: https://svn.boost.org/trac/boost/ticket/5339
|
# BOOST_ASIO_DISABLE_KQUEUE : prevents a Boost ASIO bug on OS X: https://svn.boost.org/trac/boost/ticket/5339
|
||||||
add_definitions(-DBOOST_ASIO_DISABLE_KQUEUE)
|
add_definitions(-DBOOST_ASIO_DISABLE_KQUEUE)
|
||||||
|
@ -142,6 +142,7 @@ if (MSVC)
|
|||||||
target_compile_definitions(PrusaSlicer_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
target_compile_definitions(PrusaSlicer_app_gui PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE)
|
||||||
add_dependencies(PrusaSlicer_app_gui PrusaSlicer)
|
add_dependencies(PrusaSlicer_app_gui PrusaSlicer)
|
||||||
set_target_properties(PrusaSlicer_app_gui PROPERTIES OUTPUT_NAME "prusa-slicer")
|
set_target_properties(PrusaSlicer_app_gui PROPERTIES OUTPUT_NAME "prusa-slicer")
|
||||||
|
target_include_directories(PrusaSlicer_app_gui SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
|
||||||
|
|
||||||
add_executable(PrusaSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc)
|
add_executable(PrusaSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc)
|
||||||
# Generate debug symbols even in release mode.
|
# Generate debug symbols even in release mode.
|
||||||
@ -149,6 +150,7 @@ if (MSVC)
|
|||||||
target_compile_definitions(PrusaSlicer_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE)
|
target_compile_definitions(PrusaSlicer_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE)
|
||||||
add_dependencies(PrusaSlicer_app_console PrusaSlicer)
|
add_dependencies(PrusaSlicer_app_console PrusaSlicer)
|
||||||
set_target_properties(PrusaSlicer_app_console PROPERTIES OUTPUT_NAME "prusa-slicer-console")
|
set_target_properties(PrusaSlicer_app_console PROPERTIES OUTPUT_NAME "prusa-slicer-console")
|
||||||
|
target_include_directories(PrusaSlicer_app_console SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Link the resources dir to where Slic3r GUI expects it
|
# Link the resources dir to where Slic3r GUI expects it
|
||||||
|
@ -10,3 +10,5 @@ add_library(admesh STATIC
|
|||||||
stlinit.cpp
|
stlinit.cpp
|
||||||
util.cpp
|
util.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(admesh SYSTEM PRIVATE ${Boost_INCLUDE_DIRS})
|
||||||
|
@ -18,3 +18,7 @@ add_library(nowide STATIC
|
|||||||
nowide/utf8_codecvt.hpp
|
nowide/utf8_codecvt.hpp
|
||||||
nowide/windows.hpp
|
nowide/windows.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(nowide SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,9 +91,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(${SRC_DIR}/libnest2d/backends/${LIBNEST2D_GEOMETRIES})
|
add_subdirectory(${SRC_DIR}/libnest2d/backends/${LIBNEST2D_GEOMETRIES})
|
||||||
|
target_link_libraries(libnest2d INTERFACE ${LIBNEST2D_GEOMETRIES}Backend)
|
||||||
add_subdirectory(${SRC_DIR}/libnest2d/optimizers/${LIBNEST2D_OPTIMIZER})
|
add_subdirectory(${SRC_DIR}/libnest2d/optimizers/${LIBNEST2D_OPTIMIZER})
|
||||||
|
target_link_libraries(libnest2d INTERFACE ${LIBNEST2D_OPTIMIZER}Optimizer)
|
||||||
|
|
||||||
target_sources(libnest2d INTERFACE ${LIBNEST2D_SRCFILES})
|
#target_sources(libnest2d INTERFACE ${LIBNEST2D_SRCFILES})
|
||||||
target_include_directories(libnest2d INTERFACE ${SRC_DIR})
|
target_include_directories(libnest2d INTERFACE ${SRC_DIR})
|
||||||
|
|
||||||
if(NOT LIBNEST2D_HEADER_ONLY)
|
if(NOT LIBNEST2D_HEADER_ONLY)
|
||||||
|
@ -50,8 +50,8 @@ if(NOT TARGET clipper) # If there is a clipper target in the parent project we a
|
|||||||
else()
|
else()
|
||||||
# set(CLIPPER_INCLUDE_DIRS "" PARENT_SCOPE)
|
# set(CLIPPER_INCLUDE_DIRS "" PARENT_SCOPE)
|
||||||
# set(CLIPPER_LIBRARIES clipper PARENT_SCOPE)
|
# set(CLIPPER_LIBRARIES clipper PARENT_SCOPE)
|
||||||
add_library(ClipperBackend INTERFACE)
|
add_library(clipperBackend INTERFACE)
|
||||||
target_link_libraries(ClipperBackend INTERFACE clipper)
|
target_link_libraries(clipperBackend INTERFACE clipper)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Clipper backend is not enough on its own, it still needs some functions
|
# Clipper backend is not enough on its own, it still needs some functions
|
||||||
@ -61,14 +61,14 @@ if(NOT Boost_INCLUDE_DIRS_FOUND)
|
|||||||
# TODO automatic download of boost geometry headers
|
# TODO automatic download of boost geometry headers
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(ClipperBackend INTERFACE ${Boost_INCLUDE_DIRS} )
|
target_include_directories(clipperBackend SYSTEM INTERFACE ${Boost_INCLUDE_DIRS} )
|
||||||
target_sources(ClipperBackend INTERFACE
|
#target_sources(ClipperBackend INTERFACE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/geometries.hpp
|
# ${CMAKE_CURRENT_SOURCE_DIR}/geometries.hpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/clipper_polygon.hpp
|
# ${CMAKE_CURRENT_SOURCE_DIR}/clipper_polygon.hpp
|
||||||
${SRC_DIR}/libnest2d/utils/boost_alg.hpp )
|
# ${SRC_DIR}/libnest2d/utils/boost_alg.hpp )
|
||||||
|
|
||||||
target_compile_definitions(ClipperBackend INTERFACE LIBNEST2D_BACKEND_CLIPPER)
|
target_compile_definitions(clipperBackend INTERFACE LIBNEST2D_BACKEND_CLIPPER)
|
||||||
|
|
||||||
# And finally plug the ClipperBackend into libnest2d
|
# And finally plug the ClipperBackend into libnest2d
|
||||||
target_link_libraries(libnest2d INTERFACE ClipperBackend)
|
#target_link_libraries(libnest2d INTERFACE ClipperBackend)
|
||||||
|
|
||||||
|
@ -39,23 +39,23 @@ if(NOT NLopt_FOUND)
|
|||||||
set(NLopt_INCLUDE_DIR ${nlopt_BINARY_DIR} ${nlopt_BINARY_DIR}/src/api)
|
set(NLopt_INCLUDE_DIR ${nlopt_BINARY_DIR} ${nlopt_BINARY_DIR}/src/api)
|
||||||
set(SHARED_LIBS_STATE ${SHARED_STATE})
|
set(SHARED_LIBS_STATE ${SHARED_STATE})
|
||||||
|
|
||||||
add_library(NloptOptimizer INTERFACE)
|
add_library(nloptOptimizer INTERFACE)
|
||||||
target_link_libraries(NloptOptimizer INTERFACE nlopt)
|
target_link_libraries(nloptOptimizer INTERFACE nlopt)
|
||||||
target_include_directories(NloptOptimizer INTERFACE ${NLopt_INCLUDE_DIR})
|
target_include_directories(nloptOptimizer INTERFACE ${NLopt_INCLUDE_DIR})
|
||||||
|
|
||||||
else()
|
else()
|
||||||
add_library(NloptOptimizer INTERFACE)
|
add_library(nloptOptimizer INTERFACE)
|
||||||
target_link_libraries(NloptOptimizer INTERFACE Nlopt::Nlopt)
|
target_link_libraries(nloptOptimizer INTERFACE Nlopt::Nlopt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources( NloptOptimizer INTERFACE
|
#target_sources( NloptOptimizer INTERFACE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/simplex.hpp
|
#${CMAKE_CURRENT_SOURCE_DIR}/simplex.hpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/subplex.hpp
|
#${CMAKE_CURRENT_SOURCE_DIR}/subplex.hpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/genetic.hpp
|
#${CMAKE_CURRENT_SOURCE_DIR}/genetic.hpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/nlopt_boilerplate.hpp
|
#${CMAKE_CURRENT_SOURCE_DIR}/nlopt_boilerplate.hpp
|
||||||
)
|
#)
|
||||||
|
|
||||||
target_compile_definitions(NloptOptimizer INTERFACE LIBNEST2D_OPTIMIZER_NLOPT)
|
target_compile_definitions(nloptOptimizer INTERFACE LIBNEST2D_OPTIMIZER_NLOPT)
|
||||||
|
|
||||||
# And finally plug the NloptOptimizer into libnest2d
|
# And finally plug the NloptOptimizer into libnest2d
|
||||||
target_link_libraries(libnest2d INTERFACE NloptOptimizer)
|
#target_link_libraries(libnest2d INTERFACE NloptOptimizer)
|
||||||
|
@ -180,6 +180,7 @@ if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_compile_definitions(libslic3r PUBLIC -DUSE_TBB)
|
target_compile_definitions(libslic3r PUBLIC -DUSE_TBB)
|
||||||
|
target_include_directories(libslic3r SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
|
||||||
target_include_directories(libslic3r PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${LIBNEST2D_INCLUDES} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
target_include_directories(libslic3r PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${LIBNEST2D_INCLUDES} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
target_link_libraries(libslic3r
|
target_link_libraries(libslic3r
|
||||||
libnest2d
|
libnest2d
|
||||||
|
@ -12,3 +12,5 @@ add_library(miniz STATIC
|
|||||||
miniz_tinfl.cpp
|
miniz_tinfl.cpp
|
||||||
miniz_zip.cpp
|
miniz_zip.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_libraries(miniz nowide)
|
||||||
|
Loading…
Reference in New Issue
Block a user