Alexey Sokolov 9337e12418
Several fixes for make install (#437)
* Don't install test

* Install to the correct directory (e.g. lib64)

* Install includes to /usr/include/recastnavigation
2020-09-24 10:08:03 +02:00

37 lines
875 B
CMake

file(GLOB SOURCES Source/*.cpp)
if (RECASTNAVIGATION_STATIC)
add_library(DebugUtils STATIC ${SOURCES})
else()
add_library(DebugUtils SHARED ${SOURCES})
endif()
add_library(RecastNavigation::DebugUtils ALIAS DebugUtils)
set(DebugUtils_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
target_include_directories(DebugUtils PUBLIC
"$<BUILD_INTERFACE:${DebugUtils_INCLUDE_DIR}>"
)
target_link_libraries(DebugUtils
Recast
Detour
DetourTileCache
)
set_target_properties(DebugUtils PROPERTIES
SOVERSION ${SOVERSION}
VERSION ${VERSION}
)
install(TARGETS DebugUtils
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT library
)
file(GLOB INCLUDES Include/*.h)
install(FILES ${INCLUDES} DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation)