aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Hoa Dinh <dvh@google.com>2014-11-12 13:17:10 -0800
committerGravatar Hoa Dinh <dvh@google.com>2014-11-12 13:17:10 -0800
commit0d37e23ee35d33a59d4787edec6fe6c00b9da2e2 (patch)
treee187f7d58aa5f3e5dbfa7ad6f5cc7b2cce2e65e2 /tests
parent93d85f64f1c2d3364e52683d5e895f0de4b3ee8e (diff)
CMakefile for tests
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt29
1 files changed, 21 insertions, 8 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 58bdcf70..e2ea3f54 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,17 +1,30 @@
-pkg_check_modules (GLIB2 glib-2.0)
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+pkg_check_modules (GLIB2 glib-2.0)
+set(icu_libraries icudata icui18n icuio icule iculx icutest icutu icuuc)
+set(linux_libraries ${icu_libraries} pthread uuid)
+ENDIF()
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src/include ${GLIB2_INCLUDE_DIRS})
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}/../src/include
+ ${GLIB2_INCLUDE_DIRS}
+)
link_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/ctemplate-osx/lib
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/uchardet-osx/lib
${CMAKE_CURRENT_SOURCE_DIR}/../Externals/libetpan-osx/lib
)
-#find_library(FOUNDATIONFRAMEWORK NAMES Foundation)
-#find_library(SECURITYFRAMEWORK NAMES Security)
-#find_library(CORESERVICESFRAMEWORK NAMES CoreServices)
-
-add_executable (tests main.cpp)
-target_link_libraries (tests MailCore z etpan xml2 uchardet sasl2 tidy ctemplate ssl crypto pthread icudata icui18n icuio icule iculx icutest icutu icuuc uuid ${GLIB2_LIBRARIES})
+IF(APPLE)
+ find_library(FOUNDATIONFRAMEWORK NAMES Foundation)
+ find_library(SECURITYFRAMEWORK NAMES Security)
+ find_library(CORESERVICESFRAMEWORK NAMES CoreServices)
+ set(test_mac_files test-all-mac.mm)
+ set(mac_libraries iconv)
+ENDIF()
+add_executable (tests main.cpp test-all.cpp ${test_mac_files})
+target_link_libraries (
+ tests MailCore z etpan xml2 uchardet sasl2 tidy ctemplate ssl crypto
+ ${mac_libraries} ${linux_libraries}
+ ${GLIB2_LIBRARIES} ${FOUNDATIONFRAMEWORK} ${SECURITYFRAMEWORK} ${CORESERVICESFRAMEWORK})