diff options
author | Jaquee <jaquee.monero@gmail.com> | 2017-04-02 12:19:25 +0200 |
---|---|---|
committer | Jaquee <jaquee.monero@gmail.com> | 2017-04-03 18:38:50 +0200 |
commit | f5bd346573aacba601c948038e39aed24c8c069e (patch) | |
tree | 7cc11ce2bb2195ef4d11c54b34f20918e3fdb455 /CMakeLists.txt | |
parent | add IOS CMAKE toolchain (diff) | |
download | monero-f5bd346573aacba601c948038e39aed24c8c069e.tar.xz |
IOS CMAKE build settings
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 81b25e5c4..f4deff598 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") @@ -540,8 +543,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") @@ -650,7 +654,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() |