Skip to content

Commit 89d3ec9

Browse files
author
Hugo Lindström
committed
installer: suffixed lib paths
1 parent 3093193 commit 89d3ec9

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cmake/BoostLibInstaller.cmake

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,21 @@ function(boost_lib_installer req_boost_version req_boost_libs)
105105
set(debug_lib_path "${install_dir}/${stage_dir}/lib/libboost_${lib_name}-${compiler_name}-mt-gd-${lib_postfix}.lib")
106106
set(lib_path "${install_dir}/${stage_dir}/lib/libboost_${lib_name}-${compiler_name}-mt-${lib_postfix}.lib")
107107
else()
108+
set(LIBSUFFIX "")
109+
if(UNIX)
110+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
111+
set(LIBSUFFIX "-x64")
112+
endif()
113+
endif()
114+
if(APPLE)
115+
string(REGEX MATCH "address-model\\=([0-9_]+)" model "${b2Args}")
116+
set(ADDRESS_MODEL ${CMAKE_MATCH_1})
117+
set(LIBSUFFIX "-c${ADDRESS_MODEL}")
118+
endif()
108119
if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "") OR (NOT DEFINED CMAKE_BUILD_TYPE))
109-
set(lib_path "${install_dir}/${stage_dir}/lib/libboost_${lib_name}-mt-d.a")
120+
set(lib_path "${install_dir}/${stage_dir}/lib/libboost_${lib_name}-mt-d${LIBSUFFIX}.a")
110121
else()
111-
set(lib_path "${install_dir}/${stage_dir}/lib/libboost_${lib_name}-mt.a")
122+
set(lib_path "${install_dir}/${stage_dir}/lib/libboost_${lib_name}-mt${LIBSUFFIX}.a")
112123
endif()
113124
endif()
114125

0 commit comments

Comments
 (0)