aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt38
-rw-r--r--tests/CMakeLists.txt7
2 files changed, 7 insertions, 38 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6a4bd029..3c368309 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,23 +1,6 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(APPLE)
- set(dir "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
- IF(EXISTS "${dir}" AND IS_DIRECTORY "${dir}")
- set(SDKROOT "${dir}")
- ELSE()
- set(dir "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk")
- IF(EXISTS "${dir}" AND IS_DIRECTORY "${dir}")
- set(SDKROOT "${dir}")
- ENDIF()
- ENDIF()
-
- IF(NOT SDKROOT)
- message(FATAL_ERROR "ERROR: Could not find Mac OSX SDK 10.8 or 10.9")
- ELSE()
- message(STATUS "Found Mac OSX SDK: ${SDKROOT}")
- ENDIF()
-
- set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -isysroot ${SDKROOT}")
- set(CMAKE_C_FLAGS "-isysroot ${SDKROOT}")
+ set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++")
ELSE()
set(CMAKE_CXX_FLAGS "-std=gnu++0x")
ENDIF()
@@ -36,13 +19,11 @@ IF(APPLE)
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/libetpan/include
/usr/include/tidy
/usr/include/libxml2
- ${SDKROOT}/usr/include
- ${SDKROOT}/usr/include/tidy
- ${SDKROOT}/usr/include/libxml2
)
set(additional_lib_searchpath
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/ctemplate/lib
+ ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/icu4c/lib
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/libetpan/lib
)
@@ -73,17 +54,10 @@ find_path(ICU4C_INCLUDE_DIR
NAMES unicode/utf8.h
PATHS ${additional_includes}
)
-if(APPLE)
- find_library(ICU4C_LIBRARY
- NAMES icucore
- PATHS ${additional_lib_searchpath}
- )
-else()
- find_library(ICU4C_LIBRARY
- NAMES icuuc
- PATHS ${additional_lib_searchpath}
- )
-endif()
+find_library(ICU4C_LIBRARY
+ NAMES icuuc
+ PATHS ${additional_lib_searchpath}
+)
if(NOT ICU4C_INCLUDE_DIR OR NOT ICU4C_LIBRARY)
message(FATAL_ERROR "ERROR: Could not find icu4c")
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index feee7d2c..61fa7120 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -10,10 +10,5 @@ find_library(SECURITYFRAMEWORK NAMES Security)
find_library(CORESERVICESFRAMEWORK NAMES CoreServices)
add_executable (tests main.mm test-all.mm)
-if(APPLE)
- set(ICU_LIBRARIES icucore)
-else()
- set(ICU_LIBRARIES icudata icui18n icuuc)
-endif()
-target_link_libraries (tests MailCore z etpan xml2 sasl2 iconv tidy ctemplate ssl crypto ${ICU_LIBRARIES}
+target_link_libraries (tests MailCore z etpan xml2 icudata icui18n icuuc sasl2 iconv tidy ctemplate ssl crypto
${FOUNDATIONFRAMEWORK} ${SECURITYFRAMEWORK} ${CORESERVICESFRAMEWORK})