diff options
author | Allen Winter <allen.winter@kdab.com> | 2022-01-17 12:22:42 -0500 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2022-01-17 12:22:42 -0500 |
commit | db1fbe5191efb1d5dd50af3e211390358139322d (patch) | |
tree | 484b872342c9620f54520c3d3c7d764656b077f3 /CMakeLists.txt | |
parent | 79cf904f594dfbef443c37da5412eaa37440a264 (diff) | |
parent | a4a00e7a56e306e0375f443643963e9d0f9c6762 (diff) | |
download | libical-git-db1fbe5191efb1d5dd50af3e211390358139322d.tar.gz |
Merge branch '3.0'
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fba305e..5b087a86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,6 +214,12 @@ if(DEFINED ICU_BASE) #to make --warn-uninitialized happy set(ICU_ROOT $ENV{ICU_BASE}) endif() endif() +if(NOT "$ENV{ICU_ROOT}") + #Use the homebrew version. MacOS provided ICU doesn't provide development files + if(APPLE) + set(ICU_ROOT "/usr/local/opt/icu4c") + endif() +endif() find_package(ICU COMPONENTS uc i18n) set_package_properties(ICU PROPERTIES TYPE RECOMMENDED @@ -250,19 +256,29 @@ if(ICU_FOUND) endif() # compile in Berkeley DB support -find_package(BDB) -set_package_properties(BDB PROPERTIES +if(NOT "$ENV{BerkeleyDB_ROOT_DIR}") + if(APPLE) + #Use the homebrew version. Xcode's version doesn't work for us. + set(BerkeleyDB_ROOT_DIR "/usr/local/opt/berkeley-db") + endif() +endif() +find_package(BerkeleyDB) +set_package_properties(BerkeleyDB PROPERTIES TYPE OPTIONAL PURPOSE "For Berkeley DB storage support" ) add_feature_info( "Berkeley DB storage support" - BDB_FOUND + BerkeleyDB_FOUND "build in support for Berkeley DB storage" ) -if(BDB_FOUND) +if(BerkeleyDB_FOUND) set(HAVE_BDB True) add_definitions(-DDB_DBM_HSEARCH=0) #set to 1 if hsearch support is needed + #for compatibility to our old FindBDB + set(BDB_FOUND True) + set(BDB_INCLUDE_DIR ${BerkeleyDB_INCLUDE_DIRS}) + set(BDB_LIBRARY ${BerkeleyDB_LIBRARIES}) endif() # MSVC specific definitions |