changeset 921:37aec47f49f0 mac

successful compilation under Mac OS X Mavericks
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 24 Feb 2014 16:27:16 +0100
parents 5b63440f5164
children a0a05f9dcd5a
files Resources/CMake/BoostConfiguration.cmake Resources/CMake/Compiler.cmake
diffstat 2 files changed, 8 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/BoostConfiguration.cmake	Mon Feb 24 16:18:35 2014 +0100
+++ b/Resources/CMake/BoostConfiguration.cmake	Mon Feb 24 16:27:16 2014 +0100
@@ -54,7 +54,8 @@
 
   set(BOOST_SOURCES)
 
-  if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+  if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
+      ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
     list(APPEND BOOST_SOURCES
       ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp
       ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp
@@ -78,17 +79,14 @@
       -DBOOST_LOCALE_WITH_WCONV=1
       )
 
-  elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+  else()
+    message(FATAL_ERROR "Support your platform here")
+  endif()
+
+  if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
     list(APPEND BOOST_SOURCES
-      ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/once.cpp
-      ${BOOST_SOURCES_DIR}/libs/thread/src/pthread/thread.cpp
       ${BOOST_SOURCES_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp
       )
-
-    aux_source_directory(${BOOST_SOURCES_DIR}/libs/locale/src/posix BOOST_SOURCES)
-
-  else()
-    message(FATAL_ERROR "Support your platform here")
   endif()
 
   aux_source_directory(${BOOST_SOURCES_DIR}/libs/regex/src BOOST_REGEX_SOURCES)
@@ -104,12 +102,6 @@
     ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
     )
 
-  if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
-  #    list(REMOVE_ITEM BOOST_SOURCES
-  #    ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp
-  #    )
-  endif()
-
   list(APPEND THIRD_PARTY_SOURCES ${BOOST_SOURCES})
 
   add_definitions(
--- a/Resources/CMake/Compiler.cmake	Mon Feb 24 16:18:35 2014 +0100
+++ b/Resources/CMake/Compiler.cmake	Mon Feb 24 16:27:16 2014 +0100
@@ -73,6 +73,7 @@
   add_definitions(
     -D_XOPEN_SOURCE=1
     )
+  link_libraries(iconv)
 
 endif()