CMake: Replace include_directories with target_include_directories
This commit is contained in:
@@ -18,16 +18,6 @@ if (PCL_SAMPLE_CONSENSUS_FOUND)
|
||||
add_definitions(-DHAVE_PCL_SAMPLE_CONSENSUS)
|
||||
endif ()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${PCL_INCLUDE_DIRS}
|
||||
${FLANN_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(Reen_LIBS
|
||||
Part
|
||||
Mesh
|
||||
@@ -69,6 +59,20 @@ if(FREECAD_USE_PCH)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(ReverseEngineering SHARED ${Reen_SRCS})
|
||||
|
||||
target_include_directories(
|
||||
ReverseEngineering
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
ReverseEngineering
|
||||
SYSTEM
|
||||
PUBLIC
|
||||
${PCL_INCLUDE_DIRS}
|
||||
${FLANN_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_libraries(ReverseEngineering ${Reen_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(ReverseEngineering)
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
set(ReenGui_LIBS
|
||||
ReverseEngineering
|
||||
MeshGui
|
||||
@@ -61,7 +55,19 @@ if(FREECAD_USE_PCH)
|
||||
ADD_MSVC_PRECOMPILED_HEADER(ReverseEngineeringGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(ReverseEngineeringGui SHARED ${ReenGui_SRCS} ${ReverseEngineeringGuiIcon_SVG})
|
||||
add_library(ReverseEngineeringGui SHARED
|
||||
${ReenGui_SRCS}
|
||||
${ReverseEngineeringGuiIcon_SVG}
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
ReverseEngineeringGui
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(ReverseEngineeringGui ${ReenGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(ReverseEngineeringGui)
|
||||
|
||||
Reference in New Issue
Block a user