diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/cmake/core.cmake | 7 |
3 files changed, 15 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 542d778b..7e66aa16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ cmake_minimum_required (VERSION 2.6) -find_package(PkgConfig) project (mailcore2) IF(APPLE) @@ -7,5 +6,10 @@ IF(APPLE) set(CMAKE_EXE_LINKER_FLAGS "-lc++ -stdlib=libc++") ENDIF() +IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + find_package(PkgConfig) +ENDIF() + add_subdirectory (src) - add_subdirectory (tests) +add_subdirectory (tests) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4b12d2b..dd506d27 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -175,7 +175,9 @@ else() message(STATUS "Found zlib") endif() -pkg_check_modules (GLIB2 glib-2.0) +IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +pkg_check_modules(GLIB2 glib-2.0) +ENDIF() file(GLOB_RECURSE source_files @@ -211,5 +213,3 @@ add_library(MailCore ${async_files} ${objc_files} ) - - diff --git a/src/cmake/core.cmake b/src/cmake/core.cmake index 4e69f881..c4d41e77 100644 --- a/src/cmake/core.cmake +++ b/src/cmake/core.cmake @@ -18,9 +18,13 @@ IF(APPLE) core/rfc822/MCMessageParserMac.mm ) ENDIF() - set(basetypes_files_apple + +IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(basetypes_files_linux core/basetypes/MCMainThreadGTK.cpp ) +ENDIF() + set(basetypes_files core/basetypes/MCArray.cc @@ -48,6 +52,7 @@ set(basetypes_files core/basetypes/MCValue.cc core/basetypes/ConvertUTF.c ${basetypes_files_apple} + ${basetypes_files_linux} ) set(imap_files |