diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-04-11 00:26:15 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-04-11 00:26:15 +0200 |
commit | e9ca165b1ade5add159e36840ddb7c323c724f7b (patch) | |
tree | b20eaeac31c1e33f9a3f27798b827033a7c55596 /CMakeLists.txt | |
parent | Merge pull request #1949 (diff) | |
parent | IOS CMAKE build settings (diff) | |
download | monero-e9ca165b1ade5add159e36840ddb7c323c724f7b.tar.xz |
Merge pull request #1950
f5bd3465 IOS CMAKE build settings (Jaquee)
d8a88d05 add IOS CMAKE toolchain (Jaquee)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1061da413..ceebd49ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,9 @@ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers +if (IOS) + INCLUDE(CmakeLists_IOS.txt) +endif() cmake_minimum_required(VERSION 2.8.7) @@ -77,7 +80,7 @@ if (ARM_TEST STREQUAL "arm") endif() endif() -if (ARM_ID STREQUAL "aarch64") +if (ARM_ID STREQUAL "aarch64" OR ARM_ID STREQUAL "arm64") set(ARM 1) set(ARM8 1) endif() @@ -312,7 +315,7 @@ else() endif() # Handle OpenSSL, used for sha256sum on binary updates -if (APPLE) +if (APPLE AND NOT IOS) if (NOT OpenSSL_DIR) EXECUTE_PROCESS(COMMAND brew --prefix openssl OUTPUT_VARIABLE OPENSSL_ROOT_DIR @@ -322,7 +325,7 @@ if (APPLE) endif() find_package(OpenSSL REQUIRED) -if(STATIC) +if(STATIC AND NOT IOS) if(UNIX) set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};${CMAKE_DL_LIBS}") endif() @@ -337,7 +340,7 @@ endif() add_subdirectory(external) # Final setup for miniupnpc -if(UPNP_STATIC) +if(UPNP_STATIC OR IOS) add_definitions("-DUPNP_STATIC") else() add_definitions("-DUPNP_DYNAMIC") @@ -541,8 +544,9 @@ else() endif(ARM) - if(ANDROID AND NOT BUILD_GUI_DEPS STREQUAL "ON") + if(ANDROID AND NOT BUILD_GUI_DEPS STREQUAL "ON" OR IOS) #From Android 5: "only position independent executables (PIE) are supported" + message(STATUS "Enabling PIE executable") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -fPIE -pie") @@ -651,7 +655,7 @@ list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS}) if(ANDROID) set(ATOMIC libatomic.a) endif() -if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND ARCH_WIDTH EQUAL "32") +if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS) find_library(ATOMIC atomic) list(APPEND EXTRA_LIBRARIES ${ATOMIC}) endif() |