mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-30 17:00:26 +00:00
detect 64bit library location. compatibility for 64bit systems. (#963)
credit goes to Theo. (Theodore Papadopoulo Theodore.Papadopoulo at inria.fr https://cmake.org/pipermail/cmake/2013-July/055374.html)
This commit is contained in:
parent
13e06987cd
commit
4be19c3cbb
@ -463,6 +463,18 @@ source_group("Include\\XCore" FILES ${HEADERS_XCORE})
|
||||
source_group("Include\\M68K" FILES ${HEADERS_M68K})
|
||||
source_group("Include\\TMS320C64x" FILES ${HEADERS_TMS320C64X})
|
||||
|
||||
### test library 64bit routine:
|
||||
get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
|
||||
|
||||
if ("${LIB64}" STREQUAL "TRUE")
|
||||
set(LIBSUFFIX 64)
|
||||
else()
|
||||
set(LIBSUFFIX "")
|
||||
endif()
|
||||
|
||||
set(INSTALL_LIB_DIR lib${LIBSUFFIX} CACHE PATH "Installation directory for libraries")
|
||||
mark_as_advanced(INSTALL_LIB_DIR)
|
||||
|
||||
## installation
|
||||
install(FILES ${HEADERS_COMMON} DESTINATION include/capstone)
|
||||
configure_file(capstone.pc.in capstone.pc)
|
||||
@ -470,15 +482,15 @@ configure_file(capstone.pc.in capstone.pc)
|
||||
if (CAPSTONE_BUILD_STATIC)
|
||||
install(TARGETS capstone-static
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
|
||||
endif ()
|
||||
|
||||
if (CAPSTONE_BUILD_SHARED)
|
||||
install(TARGETS capstone-shared
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
|
||||
ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
|
||||
endif ()
|
||||
|
||||
if (CAPSTONE_BUILD_SHARED)
|
||||
|
Loading…
Reference in New Issue
Block a user