weidai11 / cryptopp

free C++ class library of cryptographic schemes
https://cryptopp.com
Other
4.83k stars 1.49k forks source link

cmake/TargetArch.cmake:66 should be able to accept Xcode macros #1211

Closed RomanZacharia closed 1 year ago

RomanZacharia commented 1 year ago

cmake/TargetArch.cmake:66 should be able to accept Xcode macros. This is useful when the cryptopp library is getting built as a dependency of an Xcode project. So that the target architechture can be specified in the Xcode project settings, which is most of the times a macro like $(ARCHS_STANDARD)

I am currently getting an error when trying to configure cryptopp as a part of my Xcode project

=> Module : cryptopp
-- [cryptopp] CMake version 3.25.2
-- [cryptopp] System iOS
-- [cryptopp] Processor arm64
-- [cryptopp]     CMAKE_OSX_ARCHITECTURES : $(ARCHS_STANDARD)
-- [cryptopp] CMAKE_HOST_SYSTEM_PROCESSOR : arm64
-- [cryptopp]      CMAKE_SYSTEM_PROCESSOR : arm64
CMake Error at cryptlib/cmake/TargetArch.cmake:67 (message):
  Invalid OS X arch name: $(ARCHS_STANDARD)
Call Stack (most recent call first):
  cryptlib/cryptopp/CMakeLists.txt:186 (target_architecture)
  cryptlib/cryptopp/CMakeLists.txt:214 (check_target_architecture)
noloader commented 1 year ago

Please visit https://github.com/abdes/cryptopp-cmake