Fix bpy.so linking on Mac OS X
authorCampbell Barton <ideasman42@gmail.com>
Tue, 1 Apr 2014 22:01:48 +0000 (09:01 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 1 Apr 2014 22:03:01 +0000 (09:03 +1100)
D345 from Aleksandr Derbenev

intern/locale/CMakeLists.txt
intern/locale/boost_locale_wrapper.cpp

index 4dc447391fcd61988396e6ad71f5daee6a89d33c..217fe9a8c71e1c9ee8d071ec464b326b1f780cf4 100644 (file)
@@ -36,6 +36,14 @@ set(SRC
        boost_locale_wrapper.h
 )
 
+if(WITH_HEADLESS)
+       add_definitions(-DWITH_HEADLESS)
+endif()
+
+if(WITH_GHOST_SDL)
+       add_definitions(-DWITH_GHOST_SDL)
+endif()
+
 if(WITH_INTERNATIONAL)
        list(APPEND INC_SYS
                ${BOOST_INCLUDE_DIR}
index c032243505a263f0435130eb7c90f2d31efe8484..25843d605785b90431b4f860512ae0e8f72e47da 100644 (file)
@@ -64,7 +64,7 @@ void bl_locale_set(const char *locale)
                        _locale = gen(locale);
                }
                else {
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(WITH_HEADLESS) && !defined(WITH_GHOST_SDL)
                        extern char GHOST_user_locale[128]; // pulled from Ghost_SystemCocoa
                        std::string locale_osx = GHOST_user_locale + std::string(".UTF-8");
                        _locale = gen(locale_osx.c_str());