CMake: Replace include_directories with target_include_directories

This commit is contained in:
wmayer
2025-07-31 15:57:16 +02:00
committed by Ladislav Michl
parent 7e57b6e7b0
commit 93db4c7d8a
45 changed files with 499 additions and 334 deletions

View File

@@ -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)

View File

@@ -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)