Skip to content

Commit 615380b

Browse files
authored
Problem: Invalid 32bit issues when using Conan
Solution: Remove architechture checks from cmake version file Since this is a header only library there is no need to check for 32 vs 64bits. See similar problem: doctest/doctest#225
1 parent bd27f24 commit 615380b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,14 @@ 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+
set(CPPZMQ_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
78+
unset(CMAKE_SIZEOF_VOID_P)
7679
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
7780
VERSION ${CPPZMQ_VERSION}
7881
COMPATIBILITY AnyNewerVersion)
82+
set(CMAKE_SIZEOF_VOID_P ${CPPZMQ_SIZEOF_VOID_P})
83+
7984
install(EXPORT ${PROJECT_NAME}-targets
8085
FILE ${PROJECT_NAME}Targets.cmake
8186
DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR})

0 commit comments

Comments
 (0)