Skip to content

Commit 5609cbd

Browse files
authored
Fix missing symbols for boost 1.67 and BOOST_ALL_NO_LIB
1 parent caa6056 commit 5609cbd

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

cmake/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ ELSE()
118118
# Disable Boost's autolinking as the libraries to be linked to are supplied
119119
# already by CMake, and it's going to conflict if there are multiple, as is
120120
# the case in conda-forge's libboost feedstock.
121-
#
122-
# Should this always be specified?
123-
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
121+
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
122+
IF(WIN32)
123+
# Necessary for boost version >= 1.67
124+
SET(BCRYPT_LIBRARIES "bcrypt.lib")
125+
ENDIF()
124126
ENDIF()
125127

126128
set(BOOST_COMPONENTS system program_options regex thread date_time)
@@ -569,8 +571,10 @@ set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
569571
add_library(IfcParse ${IFCPARSE_FILES})
570572
set_target_properties(IfcParse PROPERTIES COMPILE_FLAGS -DIFC_PARSE_EXPORTS)
571573

574+
TARGET_LINK_LIBRARIES(IfcParse ${Boost_LIBRARIES} ${BCRYPT_LIBRARIES})
575+
572576
IF(UNICODE_SUPPORT)
573-
TARGET_LINK_LIBRARIES(IfcParse ${ICU_LIBRARIES} ${Boost_LIBRARIES})
577+
TARGET_LINK_LIBRARIES(IfcParse ${ICU_LIBRARIES})
574578
ENDIF()
575579

576580
# IfcGeom

0 commit comments

Comments
 (0)