Skip to content

Commit

Permalink
respect customized CMake install locations (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
bebuch authored Dec 12, 2023
1 parent 44ff9e9 commit 6c2c988
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(ads_SRCS
AutoHideTab.cpp
AutoHideDockContainer.cpp
PushButton.cpp
ResizeHandle.cpp
ResizeHandle.cpp
ads.qrc
)
set(ads_HEADERS
Expand All @@ -62,7 +62,7 @@ set(ads_HEADERS
AutoHideTab.h
AutoHideDockContainer.h
PushButton.h
ResizeHandle.h
ResizeHandle.h
)
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
if (UNIX AND NOT APPLE)
Expand Down Expand Up @@ -120,7 +120,7 @@ write_basic_package_version_file(
COMPATIBILITY SameMajorVersion
)
install(FILES ${ads_HEADERS}
DESTINATION include/${library_name}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${library_name}
COMPONENT headers
)
install(FILES
Expand All @@ -131,25 +131,25 @@ install(FILES
)
install(TARGETS ${library_name}
EXPORT adsTargets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION include/${library_name}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${library_name}
)

install(EXPORT adsTargets
FILE adsTargets.cmake
NAMESPACE ads::
DESTINATION lib/cmake/${library_name}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${library_name}
)
install(FILES qtadvanceddockingConfig.cmake RENAME ${library_name}Config.cmake
DESTINATION lib/cmake/${library_name}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${library_name}
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${library_name}ConfigVersion.cmake"
DESTINATION lib/cmake/${library_name}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${library_name}
)

target_include_directories(${library_name} PUBLIC
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

0 comments on commit 6c2c988

Please sign in to comment.