CMakeLists.txt 679 B

1234567891011121314151617181920212223242526272829
  1. file(GLOB SOURCES Source/*.cpp)
  2. if(RECASTNAVIGATION_STATIC)
  3. add_library(Detour STATIC ${SOURCES})
  4. else()
  5. add_library(Detour SHARED ${SOURCES})
  6. endif()
  7. add_library(RecastNavigation::Detour ALIAS Detour)
  8. set(Detour_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
  9. target_include_directories(Detour PUBLIC
  10. "$<BUILD_INTERFACE:${Detour_INCLUDE_DIR}>"
  11. )
  12. set_target_properties(Detour PROPERTIES
  13. SOVERSION ${SOVERSION}
  14. VERSION ${VERSION}
  15. )
  16. install(TARGETS Detour
  17. ARCHIVE DESTINATION lib
  18. LIBRARY DESTINATION lib
  19. COMPONENT library
  20. )
  21. file(GLOB INCLUDES Include/*.h)
  22. install(FILES ${INCLUDES} DESTINATION include)