Merge pull request #80 from uilianries/cmake/install

[build] Execute installation steps for CMake
This commit is contained in:
Kosma Moczek 2024-09-11 14:36:57 +02:00 committed by GitHub
commit 4abb6f8da5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,3 +37,16 @@ if (SCAN_FOUND)
else() else()
MESSAGE(STATUS "scan-build not found, not scanning code") MESSAGE(STATUS "scan-build not found, not scanning code")
endif() endif()
include(GNUInstallDirs)
install(TARGETS minmea
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(FILES minmea.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if(MSVC)
install(FILES compat/minmea_compat_windows.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
RENAME minmea_compat.h)
endif()