diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f5c3c5..ac8a188 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,9 @@ set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY if (UNIX) set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${PROJECT_LOW}") + set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) + set_property(TARGET ${PROJECT_NAME} PROPERTY SKIP_BUILD_RPATH FALSE) + set_property(TARGET ${PROJECT_NAME} PROPERTY BUILD_WITH_INSTALL_RPATH FALSE) endif() add_subdirectory(src) @@ -83,13 +86,13 @@ target_include_directories( PUBLIC $ $ + $ ) target_include_directories(${PROJECT_NAME} PRIVATE ${Qt${QT_VERSION_MAJOR}_INCLUDE_DIRS}) target_include_directories(${PROJECT_NAME} PRIVATE ${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}) target_link_libraries( ${PROJECT_NAME} - PRIVATE Qt${QT_VERSION_MAJOR}::Core lmdb ) @@ -108,8 +111,7 @@ write_basic_package_version_file( install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_LOW}Targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_LOW} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_LOW} ) diff --git a/src/serializer/CMakeLists.txt b/src/serializer/CMakeLists.txt index f4148e9..0c0a633 100644 --- a/src/serializer/CMakeLists.txt +++ b/src/serializer/CMakeLists.txt @@ -16,6 +16,4 @@ set(HEADERS serializer_qbytearray.hpp ) -target_include_directories(${PROJECT_NAME} PUBLIC "$") - install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_LOW})