CMakeLists.txt 816 B

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