Skip to content

Commit 0757ba8

Browse files
author
Christoph Willing
committed
Add support for LIB_SUFFIX
Signed-off-by: Christoph Willing <chris.willing@iinet.net.au>
1 parent c331bb0 commit 0757ba8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ option(UTPP_AMPLIFY_WARNINGS
1111
"Set this to OFF if you wish to use CMake default warning levels; should generally only use to work around support issues for your specific compiler"
1212
ON)
1313

14+
set(LIB_SUFFIX "" CACHE STRING "Identifier to add to end of lib directory name e.g. 64 for lib64")
15+
1416
if(MSVC14 OR MSVC12)
1517
# has the support we need
1618
else()
@@ -92,24 +94,24 @@ else()
9294
set (UTPP_INSTALL_DESTINATION "include/UnitTestPP")
9395
endif()
9496

95-
set(config_install_dir_ lib/cmake/${PROJECT_NAME})
97+
set(config_install_dir_ lib${LIB_SUFFIX}/cmake/${PROJECT_NAME})
9698
set(targets_export_name_ "${PROJECT_NAME}Targets")
9799

98-
install(TARGETS UnitTest++ EXPORT "${targets_export_name_}" DESTINATION lib)
100+
install(TARGETS UnitTest++ EXPORT "${targets_export_name_}" DESTINATION lib${LIB_SUFFIX})
99101
install(FILES ${headers_} DESTINATION ${UTPP_INSTALL_DESTINATION})
100102
install(FILES ${platformHeaders_} DESTINATION ${UTPP_INSTALL_DESTINATION}/${platformDir_})
101103
install(FILES cmake/UnitTest++Config.cmake DESTINATION "${config_install_dir_}")
102104
install(EXPORT "${targets_export_name_}" DESTINATION "${config_install_dir_}")
103105

104106
set(prefix ${CMAKE_INSTALL_PREFIX})
105107
set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
106-
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
108+
set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
107109
set(includedir ${CMAKE_INSTALL_PREFIX}/include/UnitTest++)
108110
configure_file("UnitTest++.pc.in" "UnitTest++.pc" @ONLY)
109111
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
110112
set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
111113
else()
112-
set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
114+
set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig)
113115
endif()
114116
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/UnitTest++.pc"
115117
DESTINATION "${pkgconfdir}")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy