mirror of
https://github.com/bitdefender/bddisasm.git
synced 2024-12-23 06:28:13 +00:00
Add support for find_package
This commit is contained in:
parent
11fa28a8bb
commit
88c0adfc48
@ -126,11 +126,33 @@ CONFIGURE_FILE("${CMAKE_STATIC_LIBRARY_PREFIX}bddisasm.pc.in"
|
|||||||
)
|
)
|
||||||
|
|
||||||
INSTALL(TARGETS bddisasm bdshemu
|
INSTALL(TARGETS bddisasm bdshemu
|
||||||
|
EXPORT bddisasmTargets
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
|
||||||
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/bddisasm"
|
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/bddisasm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/bddisasm)
|
||||||
|
install(EXPORT bddisasmTargets
|
||||||
|
DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
|
configure_package_config_file(${PROJECT_SOURCE_DIR}/bddisasmConfig.cmake.in ${PROJECT_BINARY_DIR}/bddisasmConfig.cmake
|
||||||
|
INSTALL_DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
|
||||||
|
PATH_VARS CMAKE_INSTALL_FULL_INCLUDEDIR CMAKE_INSTALL_FULL_LIBDIR
|
||||||
|
)
|
||||||
|
|
||||||
|
write_basic_package_version_file(${PROJECT_BINARY_DIR}/bddisasmConfigVersion.cmake
|
||||||
|
VERSION ${PROJECT_VERSION}
|
||||||
|
COMPATIBILITY SameMajorVersion
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES ${PROJECT_BINARY_DIR}/bddisasmConfig.cmake ${PROJECT_BINARY_DIR}/bddisasmConfigVersion.cmake
|
||||||
|
DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
|
||||||
|
)
|
||||||
|
|
||||||
INSTALL(FILES "${PROJECT_SOURCE_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}bddisasm.pc"
|
INSTALL(FILES "${PROJECT_SOURCE_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}bddisasm.pc"
|
||||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
||||||
)
|
)
|
||||||
|
13
bddisasmConfig.cmake.in
Normal file
13
bddisasmConfig.cmake.in
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
set(BDDISASM_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||||
|
set(BDDISASM_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||||
|
set(BDDISASM_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/bddisasmTargets.cmake)
|
||||||
|
|
||||||
|
set(BDDISASM_LIBRARIES @PRIVATE_LIBS@)
|
||||||
|
|
||||||
|
check_required_components(bddisasm)
|
||||||
|
check_required_components(bdshemu)
|
||||||
|
set(BDDISASM_FOUND 1)
|
Loading…
Reference in New Issue
Block a user