CMakeLists.txt 2.2 KB

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