diff options
author | Naios <naios-dev@live.de> | 2016-03-14 15:27:33 +0100 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-03-19 23:19:50 +0100 |
commit | b0ac332d58cc7d7e2da4ba26efc2f3416c674784 (patch) | |
tree | adf5cf58803efeb51650c2da754278c2cc2f6c27 /dep/recastnavigation | |
parent | fee9bb904a5dcfc93e6ea85789b5aacc203a440a (diff) |
CMake: Provide proper interface targets from dependencies
* to make use of cmakes inherited link dependencies which
imports all include directories/ definitions from the link library
(cherry picked from commit 1a572d242593124f986d3ed08710b96a142a6763)
Diffstat (limited to 'dep/recastnavigation')
-rw-r--r-- | dep/recastnavigation/Detour/CMakeLists.txt | 20 | ||||
-rw-r--r-- | dep/recastnavigation/Recast/CMakeLists.txt | 21 |
2 files changed, 24 insertions, 17 deletions
diff --git a/dep/recastnavigation/Detour/CMakeLists.txt b/dep/recastnavigation/Detour/CMakeLists.txt index b21e4ca6273..12be71d32b4 100644 --- a/dep/recastnavigation/Detour/CMakeLists.txt +++ b/dep/recastnavigation/Detour/CMakeLists.txt @@ -16,14 +16,18 @@ set(Detour_STAT_SRCS Source/DetourNavMeshQuery.cpp Source/DetourNode.cpp ) -include_directories(Include) - -if(WIN32) - include_directories( - ${CMAKE_SOURCE_DIR}/dep/zlib - ) -endif() add_library(Detour STATIC ${Detour_STAT_SRCS}) -target_link_libraries(Detour ${ZLIB_LIBRARIES}) +target_include_directories(Detour + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/Include) + +target_link_libraries(Detour + PUBLIC + zlib) + +set_target_properties(Detour + PROPERTIES + FOLDER + "dep") diff --git a/dep/recastnavigation/Recast/CMakeLists.txt b/dep/recastnavigation/Recast/CMakeLists.txt index 738c010eb05..1eac4e75399 100644 --- a/dep/recastnavigation/Recast/CMakeLists.txt +++ b/dep/recastnavigation/Recast/CMakeLists.txt @@ -14,21 +14,24 @@ set(Recast_STAT_SRCS Source/RecastArea.cpp Source/RecastContour.cpp Source/RecastFilter.cpp - Source/RecastLayers.cpp + Source/RecastLayers.cpp Source/RecastMesh.cpp Source/RecastMeshDetail.cpp Source/RecastRasterization.cpp Source/RecastRegion.cpp ) -include_directories(Include) +add_library(Recast STATIC ${Recast_STAT_SRCS}) -if(WIN32) - include_directories( - ${CMAKE_SOURCE_DIR}/dep/zlib - ) -endif() +target_include_directories(Recast + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/Include) -add_library(Recast STATIC ${Recast_STAT_SRCS}) +target_link_libraries(Recast + PUBLIC + zlib) -target_link_libraries(Recast ${ZLIB_LIBRARIES})
\ No newline at end of file +set_target_properties(Recast + PROPERTIES + FOLDER + "dep") |