CMake: Replace include_directories with target_include_directories
This commit is contained in:
@@ -2,19 +2,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
add_definitions(-fext-numeric-literals) #fix for gcc and qt5
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${OCC_INCLUDE_DIR}
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(Path_LIBS
|
||||
Part
|
||||
area-native
|
||||
@@ -117,6 +104,23 @@ SOURCE_GROUP("Module" FILES ${Mod_SRCS})
|
||||
#endif(WIN32)
|
||||
|
||||
add_library(Path SHARED ${Path_SRCS})
|
||||
|
||||
target_include_directories(
|
||||
Path
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
Path
|
||||
SYSTEM
|
||||
PUBLIC
|
||||
${OCC_INCLUDE_DIR}
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(Path ${Path_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(Path)
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
set(PathGui_LIBS
|
||||
Path
|
||||
@@ -75,6 +70,13 @@ SET(PathGuiIcon_SVG
|
||||
)
|
||||
|
||||
add_library(PathGui SHARED ${PathGui_SRCS} ${PathGuiIcon_SVG})
|
||||
target_include_directories(
|
||||
PathGui
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
target_link_libraries(PathGui ${PathGui_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PathGui)
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
set(PathSimulator_LIBS
|
||||
Path
|
||||
Part
|
||||
@@ -35,6 +28,14 @@ generate_from_py(PathSim)
|
||||
SOURCE_GROUP("Python" FILES ${Python_SRCS})
|
||||
|
||||
add_library(PathSimulator SHARED ${PathSimulator_SRCS})
|
||||
target_include_directories(
|
||||
PathSimulator
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
target_link_libraries(PathSimulator ${PathSimulator_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(PathSimulator)
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
set(CAMSimulator_LIBS
|
||||
Path
|
||||
@@ -89,6 +83,14 @@ if(FREECAD_USE_PCH)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(CAMSimulator SHARED ${CAMSimulator_SRCS})
|
||||
target_include_directories(
|
||||
CAMSimulator
|
||||
PRIVATE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
target_link_libraries(CAMSimulator ${CAMSimulator_LIBS})
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(CAMSimulator)
|
||||
|
||||
Reference in New Issue
Block a user