Skip to content

Commit 8d5c9a8

Browse files
authored
Merge pull request #374 from gummif/patch-2
Problem: Invalid 32bit issues when using Conan
2 parents bd27f24 + ff994d9 commit 8d5c9a8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,18 @@ export(EXPORT ${PROJECT_NAME}-targets
7373
configure_package_config_file(${PROJECT_NAME}Config.cmake.in
7474
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
7575
INSTALL_DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR})
76+
# Workaround until ARCH_INDEPENDENT flag can be used with cmake 3.14.
77+
# The ConigVersion.cmake file contains checks for the architecture is was
78+
# generated on, which can cause problems for header only libraries
79+
# used with e.g. the Conan package manager. Since it is header only we
80+
# can/should omit those checks.
81+
set(CPPZMQ_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
82+
set(CMAKE_SIZEOF_VOID_P "") # a simple unset is not sufficient
7683
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
7784
VERSION ${CPPZMQ_VERSION}
7885
COMPATIBILITY AnyNewerVersion)
86+
set(CMAKE_SIZEOF_VOID_P ${CPPZMQ_SIZEOF_VOID_P})
87+
7988
install(EXPORT ${PROJECT_NAME}-targets
8089
FILE ${PROJECT_NAME}Targets.cmake
8190
DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR})

0 commit comments

Comments
 (0)