changeset 2371:8ab3310dd4f7

fix openbsd build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Aug 2017 23:33:21 +0200
parents 61371420f383
children 39600af9fec3
files Resources/CMake/BoostConfiguration.cmake Resources/CMake/LibIconvConfiguration.cmake
diffstat 2 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/BoostConfiguration.cmake	Tue Aug 22 22:20:26 2017 +0200
+++ b/Resources/CMake/BoostConfiguration.cmake	Tue Aug 22 23:33:21 2017 +0200
@@ -202,7 +202,6 @@
         CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR
         CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR
         CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD" OR
-        CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR
         CMAKE_SYSTEM_NAME STREQUAL "PNaCl" OR
         CMAKE_SYSTEM_NAME STREQUAL "NaCl32" OR
         CMAKE_SYSTEM_NAME STREQUAL "NaCl64")
@@ -220,6 +219,21 @@
         -DBOOST_LOCALE_NO_STD_BACKEND=1
         )
       
+    elseif (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
+      list(APPEND BOOST_SOURCES
+        ${BOOST_SOURCES_DIR}/libs/locale/src/std/codecvt.cpp
+        ${BOOST_SOURCES_DIR}/libs/locale/src/std/collate.cpp
+        ${BOOST_SOURCES_DIR}/libs/locale/src/std/converter.cpp
+        ${BOOST_SOURCES_DIR}/libs/locale/src/std/numeric.cpp
+        ${BOOST_SOURCES_DIR}/libs/locale/src/std/std_backend.cpp
+        )
+
+      add_definitions(
+        -DBOOST_LOCALE_WITH_ICONV=1
+        -DBOOST_LOCALE_NO_WINAPI_BACKEND=1
+        -DBOOST_LOCALE_NO_POSIX_BACKEND=1
+        )
+      
     elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
       list(APPEND BOOST_SOURCES
         ${BOOST_SOURCES_DIR}/libs/locale/src/win32/collate.cpp
--- a/Resources/CMake/LibIconvConfiguration.cmake	Tue Aug 22 22:20:26 2017 +0200
+++ b/Resources/CMake/LibIconvConfiguration.cmake	Tue Aug 22 23:33:21 2017 +0200
@@ -79,7 +79,7 @@
     endif()
 
     # Check whether the support for libiconv is bundled within the
-    # standard library
+    # standard C library
     CHECK_FUNCTION_EXISTS(iconv_open HAVE_ICONV_LIB)
     if (NOT HAVE_ICONV_LIB)
       # No builtin support for libiconv, try and find an external library.