Commit c6a5b532 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] include directories only for the target

And define scopes
parent a666e661
...@@ -38,11 +38,6 @@ SET_TARGET_PROPERTIES(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True) ...@@ -38,11 +38,6 @@ SET_TARGET_PROPERTIES(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
# Name of the Python library # Name of the Python library
SET(LIBRARY_NAME hppfcl) SET(LIBRARY_NAME hppfcl)
INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" ${PYTHON_INCLUDE_DIRS})
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
SET(${LIBRARY_NAME}_HEADERS SET(${LIBRARY_NAME}_HEADERS
fcl.hh fcl.hh
) )
...@@ -103,6 +98,9 @@ SET(${LIBRARY_NAME}_SOURCES ...@@ -103,6 +98,9 @@ SET(${LIBRARY_NAME}_SOURCES
) )
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS}) ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} SYSTEM PRIVATE "${Boost_INCLUDE_DIRS}" ${PYTHON_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/src" "${CMAKE_CURRENT_BINARY_DIR}")
ADD_DEPENDENCIES(python ${LIBRARY_NAME}) ADD_DEPENDENCIES(python ${LIBRARY_NAME})
ADD_HEADER_GROUP(${LIBRARY_NAME}_HEADER) ADD_HEADER_GROUP(${LIBRARY_NAME}_HEADER)
ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES) ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment