mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Add support for CMake Find config module
This commit is contained in:
parent
664a1674ab
commit
909c189d7f
@ -80,11 +80,27 @@ install(FILES
|
|||||||
COMPONENT license
|
COMPONENT license
|
||||||
)
|
)
|
||||||
install(TARGETS qtadvanceddocking
|
install(TARGETS qtadvanceddocking
|
||||||
EXPORT adsBinary
|
EXPORT adsTargets
|
||||||
RUNTIME DESTINATION bin COMPONENT library
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib COMPONENT library
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib COMPONENT library
|
ARCHIVE DESTINATION lib
|
||||||
|
INCLUDES DESTINATION include
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
write_basic_package_version_file("adsConfigVersion.cmake"
|
||||||
|
VERSION ${ads_VERSION}
|
||||||
|
COMPATIBILITY SameMajorVersion
|
||||||
|
)
|
||||||
|
install(EXPORT adsTargets
|
||||||
|
FILE adsTargets.cmake
|
||||||
|
NAMESPACE ads::
|
||||||
|
DESTINATION lib/cmake/ads
|
||||||
|
)
|
||||||
|
install(FILES "adsConfig.cmake" "${CMAKE_BINARY_DIR}/adsConfigVersion.cmake"
|
||||||
|
DESTINATION lib/cmake/ads
|
||||||
|
)
|
||||||
|
|
||||||
target_include_directories(qtadvanceddocking PUBLIC
|
target_include_directories(qtadvanceddocking PUBLIC
|
||||||
"$<BUILD_INTERFACE:${ads_INCLUDE}>"
|
"$<BUILD_INTERFACE:${ads_INCLUDE}>"
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
@ -93,7 +109,7 @@ target_link_libraries(qtadvanceddocking PUBLIC ${ads_LIBS})
|
|||||||
target_compile_definitions(qtadvanceddocking PRIVATE ${ads_COMPILE_DEFINE})
|
target_compile_definitions(qtadvanceddocking PRIVATE ${ads_COMPILE_DEFINE})
|
||||||
set_target_properties(qtadvanceddocking PROPERTIES
|
set_target_properties(qtadvanceddocking PROPERTIES
|
||||||
VERSION ${ads_VERSION}
|
VERSION ${ads_VERSION}
|
||||||
EXPORT_NAME "Qt Advanced Docking System"
|
EXPORT_NAME "QtAdvancedDockingSystem"
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin"
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin"
|
||||||
|
5
adsConfig.cmake
Normal file
5
adsConfig.cmake
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
find_dependency(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
|
||||||
|
find_dependency(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
|
||||||
|
find_dependency(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/adsTargets.cmake")
|
Loading…
Reference in New Issue
Block a user