Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenWrt updates #109

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cmake cleanup
  • Loading branch information
fealebenpae committed Nov 2, 2023
commit a6b0ddbafa99412eb8eb1df81cd4a5431d6c8c29
19 changes: 3 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.15)

project(RealmCxx)

@@ -16,19 +16,12 @@ endif()

set(REALM_BUILD_LIB_ONLY ON)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(REALM_USE_SYSTEM_OPENSSL ON)
set(OPENSSL_USE_STATIC_LIBS OFF)
set(REALM_USE_SYSTEM_OPENSSL ON CACHE BOOL "Find OpenSSL installed on the system instead of using a prebuilt copy")
set(OPENSSL_USE_STATIC_LIBS OFF CACHE BOOL "Link statically against OpenSSL")
endif()

add_subdirectory(realm-core)

set(REALM_NO_CONFIG)
set(REALM_ENABLE_SYNC)
set(REALM_NO_TESTS)
set(REALM_BUILD_LIB_ONLY)
set(REALM_INSTALL_LIBEXECDIR)
set(REALM_ENABLE_ENCRYPTION 1)

list(APPEND CMAKE_MODULE_PATH
"${RealmCxx_SOURCE_DIR}/tools/cmake" # for GetVersion
"${RealmCxx_SOURCE_DIR}/realm-core/tools/cmake") # for GetGitRevisionDescription
@@ -38,12 +31,6 @@ if(NOT DEFINED REALMCXX_VERSION)
git_describe(REALMCXX_VERSION)
endif()

add_compile_definitions(REALM_NO_CONFIG)
add_compile_definitions(REALM_ENABLE_SYNC)
add_compile_definitions(REALM_ENABLE_ENCRYPTION)
add_compile_definitions(REALM_INSTALL_LIBEXECDIR)
add_compile_definitions(REALM_BUILD_LIB_ONLY)

# Check if the compiler is Clang or GCC >= 11
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0"))
set(ENABLE_ALPHA_SDK TRUE)