CMakeLists.txt 775 B

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