aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-11-25 15:22:09 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-11-25 15:22:09 -0800
commit203501c14afaf6704d965de0ae7de3474424d166 (patch)
treee352a045c0c7c71d0ab953d92c6dbe06f545ce3f /tests
parent64bf89ebdd0584a6951b68d815a3bb5abd4cdc1d (diff)
Refactored CMakefiles, unit tests for Linux enabled
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt23
1 files changed, 7 insertions, 16 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e2ea3f54..fd07abba 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,30 +1,21 @@
-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}
)
+
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
+ ${additional_lib_searchpath}
)
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})
-
+ tests MailCore
+ ${ZLIB_LIBRARY} ${LIBETPAN_LIBRARY} ${LIBXML_LIBRARY} ${UCHARDET_LIBRARY} sasl2
+ ${TIDY_LIBRARY} ${CTEMPLATE_LIBRARY} ssl crypto ${linux_libraries} ${mac_libraries} ${ICU4C_LIBRARY}
+ ${GLIB2_LIBRARIES} ${FOUNDATIONFRAMEWORK} ${SECURITYFRAMEWORK} ${CORESERVICESFRAMEWORK}
+)