Skip to content

Commit

Permalink
cmake: fix installing
Browse files Browse the repository at this point in the history
  • Loading branch information
willeccles committed May 15, 2024
1 parent e9e6974 commit caff705
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
22 changes: 0 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,32 +98,10 @@ target_link_libraries(bciabs_scpi PRIVATE
)

if(BCIABS_SCPI_INSTALL)
include(CMakePackageConfigHelpers)

set(BCIABS_SCPI_VERSION_CONFIG
"${CMAKE_CURRENT_BINARY_DIR}/module/BciAbsScpiConfigVersion.cmake")
set(BCIABS_SCPI_PROJECT_CONFIG
"${CMAKE_CURRENT_BINARY_DIR}/module/BciAbsScpiConfig.cmake")
set(BCIABS_SCPI_CONFIG_INSTALL_DIR
"${CMAKE_INSTALL_DATAROOTDIR}/cmake/BciAbsScpi")

write_basic_package_version_file("${BCIABS_SCPI_VERSION_CONFIG}"
VERSION "${PROJECT_VERSION}"
COMPATIBILITY SameMajorVersion)

configure_package_config_file("cmake/config.cmake.in"
"${BCIABS_SCPI_PROJECT_CONFIG}"
INSTALL_DESTINATION "${BCIABS_SCPI_CONFIG_INSTALL_DIR}")

install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/bci"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES "${BCIABS_SCPI_PROJECT_CONFIG}" "${BCIABS_SCPI_VERSION_CONFIG}"
DESTINATION "${BCIABS_SCPI_CONFIG_INSTALL_DIR}")
install(EXPORT ${PROJECT_NAME}-targets NAMESPACE bci::
DESTINATION "${BCIABS_SCPI_CONFIG_INSTALL_DIR}")

install(TARGETS bciabs_scpi
EXPORT ${PROJECT_NAME}-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
4 changes: 0 additions & 4 deletions cmake/config.cmake.in

This file was deleted.

0 comments on commit caff705

Please sign in to comment.