mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +00:00
CMake: fix install target's export
This commit is contained in:
parent
1a00dac1ee
commit
c129bc23a4
1 changed files with 14 additions and 20 deletions
|
@ -8,7 +8,7 @@ set(cpuid_sources
|
||||||
msrdriver.c
|
msrdriver.c
|
||||||
asm-bits.c)
|
asm-bits.c)
|
||||||
|
|
||||||
if(WIN32 AND "${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "x64")
|
if("${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "x64")
|
||||||
list(APPEND cpuid_sources masm-x64.asm)
|
list(APPEND cpuid_sources masm-x64.asm)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -67,26 +67,20 @@ configure_package_config_file("${CMAKE_MODULE_PATH}/Config.cmake.in" "${project_
|
||||||
INSTALL_DESTINATION "${config_install_dir}")
|
INSTALL_DESTINATION "${config_install_dir}")
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
if(WIN32)
|
|
||||||
install(
|
|
||||||
TARGETS cpuid
|
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
|
||||||
LIBRARY DESTINATION "lib"
|
|
||||||
ARCHIVE DESTINATION "lib"
|
|
||||||
RUNTIME DESTINATION "bin"
|
|
||||||
INCLUDES
|
|
||||||
DESTINATION "include")
|
|
||||||
install(
|
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
|
||||||
NAMESPACE "${namespace}"
|
|
||||||
DESTINATION "${config_install_dir}")
|
|
||||||
|
|
||||||
else()
|
install(
|
||||||
install(
|
TARGETS cpuid
|
||||||
TARGETS cpuid
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION "lib"
|
||||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
ARCHIVE DESTINATION "lib"
|
||||||
endif()
|
RUNTIME DESTINATION "bin"
|
||||||
|
INCLUDES
|
||||||
|
PUBLIC_HEADER DESTINATION "include")
|
||||||
|
|
||||||
|
install(
|
||||||
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
|
NAMESPACE "${namespace}"
|
||||||
|
DESTINATION "${config_install_dir}")
|
||||||
|
|
||||||
install(FILES "${project_config}" "${version_config}" DESTINATION "${config_install_dir}")
|
install(FILES "${project_config}" "${version_config}" DESTINATION "${config_install_dir}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue