diff options
author | lateralusX <lateralusx.github@gmail.com> | 2018-10-08 11:54:25 +0300 |
---|---|---|
committer | lateralusX <lateralusx.github@gmail.com> | 2018-10-08 11:54:25 +0300 |
commit | 911e2e4d34bb22a2166c4b4ddd755779e8f06c8c (patch) | |
tree | 156de2440fd0d42d1cdaa77fa8f8feff030bb616 /CMakeLists.txt | |
parent | 41221b45aafbbe9bb1ddadae4ac9e7dfdb2121b1 (diff) |
Reduce build dependencies when building with OPENSSL_NO_ASM.
Windows is currently building with OPENSSL_NO_ASM on cygwin/mingw/msvc.
Current cmake files still includes dependencies only needed when building
with ASM support, this PR reduce needed dependencies when building with
OPENSSL_NO_ASM (not requiring perl, yasm, ninja). In the long run we will
get all dependencies working on all Windows builds as well, but until that
is done, this enhancements to the build scripts will be beneficial.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5da9df33..30c00425 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,10 +15,14 @@ enable_language(CXX) if(ANDROID) # Android-NDK CMake files reconfigure the path and so Go and Perl won't be # found. However, ninja will still find them in $PATH if we just name them. - set(PERL_EXECUTABLE "perl") + if(NOT OPENSSL_NO_ASM) + set(PERL_EXECUTABLE "perl") + endif() # set(GO_EXECUTABLE "go") else() - find_package(Perl REQUIRED) + if(NOT OPENSSL_NO_ASM) + find_package(Perl REQUIRED) + endif() # find_program(GO_EXECUTABLE go) endif() @@ -185,7 +189,9 @@ if (ANDROID AND ${ARCH} STREQUAL "arm") # The Android-NDK CMake files somehow fail to set the -march flag for # assembly files. Without this flag, the compiler believes that it's # building for ARMv5. - set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=${CMAKE_SYSTEM_PROCESSOR}") + if (NOT OPENSSL_NO_ASM) + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=${CMAKE_SYSTEM_PROCESSOR}") + endif() endif() # if (${ARCH} STREQUAL "x86" AND APPLE) |