CMakeLists.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. cmake_minimum_required(VERSION 3.10)
  2. project(gpxtools)
  3. find_package(EXPAT REQUIRED)
  4. include_directories (. ${EXPAT_INCLUDE_DIRS})
  5. if(CYGWIN)
  6. add_definitions(-D_XOPEN_SOURCE=700)
  7. endif()
  8. add_executable(gpxls gpxls.cpp Arguments.cpp Algorithm.cpp XMLParser.cpp)
  9. target_link_libraries(gpxls ${EXPAT_LIBRARIES})
  10. install(TARGETS gpxls RUNTIME DESTINATION bin)
  11. add_executable(gpxjson gpxjson.cpp Arguments.cpp Algorithm.cpp XMLParser.cpp)
  12. target_link_libraries(gpxjson ${EXPAT_LIBRARIES})
  13. install(TARGETS gpxjson RUNTIME DESTINATION bin)
  14. add_executable(gpxplot gpxplot.cpp Arguments.cpp Algorithm.cpp XMLParser.cpp)
  15. target_link_libraries(gpxplot ${EXPAT_LIBRARIES})
  16. install(TARGETS gpxplot RUNTIME DESTINATION bin)
  17. add_executable(gpxcoord gpxcoord.cpp Arguments.cpp)
  18. target_link_libraries(gpxcoord)
  19. install(TARGETS gpxcoord RUNTIME DESTINATION bin)
  20. add_executable(gpxrm gpxrm.cpp Arguments.cpp XMLRawParser.cpp)
  21. target_link_libraries(gpxrm ${EXPAT_LIBRARIES})
  22. install(TARGETS gpxrm RUNTIME DESTINATION bin)
  23. add_executable(gpxsplit gpxsplit.cpp Arguments.cpp Algorithm.cpp XMLRawParser.cpp)
  24. target_link_libraries(gpxsplit ${EXPAT_LIBRARIES})
  25. install(TARGETS gpxsplit RUNTIME DESTINATION bin)
  26. add_executable(gpxsim gpxsim.cpp Arguments.cpp Algorithm.cpp XMLRawParser.cpp)
  27. target_link_libraries(gpxsim ${EXPAT_LIBRARIES})
  28. install(TARGETS gpxsim RUNTIME DESTINATION bin)
  29. add_executable(gpxcat gpxcat.cpp Arguments.cpp Algorithm.cpp XMLRawParser.cpp)
  30. target_link_libraries(gpxcat ${EXPAT_LIBRARIES})
  31. install(TARGETS gpxcat RUNTIME DESTINATION bin)
  32. add_executable(gpxosm gpxosm.cpp Arguments.cpp Algorithm.cpp XMLParser.cpp)
  33. target_link_libraries(gpxosm ${EXPAT_LIBRARIES})
  34. install(TARGETS gpxosm RUNTIME DESTINATION bin)
  35. add_executable(gpxgeotag gpxgeotag.cpp Arguments.cpp XMLParser.cpp)
  36. target_link_libraries(gpxgeotag ${EXPAT_LIBRARIES})
  37. install(TARGETS gpxgeotag RUNTIME DESTINATION bin)
  38. add_executable(gpxpath gpxpath.cpp Arguments.cpp XMLRawParser.cpp)
  39. target_link_libraries(gpxpath ${EXPAT_LIBRARIES})
  40. install(TARGETS gpxpath RUNTIME DESTINATION bin)
  41. add_executable(gpxfetch gpxfetch.cpp Arguments.cpp XMLRawParser.cpp)
  42. target_link_libraries(gpxfetch ${EXPAT_LIBRARIES})
  43. install(TARGETS gpxfetch RUNTIME DESTINATION bin)
  44. add_executable(gpxwind gpxwind.cpp Arguments.cpp Algorithm.cpp XMLParser.cpp)
  45. target_link_libraries(gpxwind ${EXPAT_LIBRARIES})
  46. install(TARGETS gpxwind RUNTIME DESTINATION bin)
  47. CONFIGURE_FILE(
  48. "${CMAKE_SOURCE_DIR}/cmake_uninstall.cmake.in"
  49. "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
  50. IMMEDIATE @ONLY)
  51. ADD_CUSTOM_TARGET(uninstall
  52. "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")