From: <ego...@us...> - 2015-02-07 16:07:06
|
Revision: 60649 http://sourceforge.net/p/firebird/code/60649 Author: egorpugin Date: 2015-02-07 16:07:04 +0000 (Sat, 07 Feb 2015) Log Message: ----------- [build] [cmake] Add ICU setup section. Add clang ifdef. Modified Paths: -------------- firebird/trunk/CMakeLists.txt firebird/trunk/src/common/classes/alloc.h Modified: firebird/trunk/CMakeLists.txt =================================================================== --- firebird/trunk/CMakeLists.txt 2015-02-07 14:58:31 UTC (rev 60648) +++ firebird/trunk/CMakeLists.txt 2015-02-07 16:07:04 UTC (rev 60649) @@ -4,10 +4,11 @@ # This file has following organization: # 1. cmake settings # 2. project settings -# 3. configure -# 4. compiler & linker settings -# 5. pre-build -# 6. build +# 3. packages +# 4. configure +# 5. compiler & linker settings +# 6. pre-build +# 7. build # ################################################################################ @@ -104,6 +105,41 @@ ################################################################################ # +# packages +# +################################################################################ + +######################################## +# icu +######################################## + +if (UNIX) + if (NOT ICU_INCLUDE_DIR) + find_path(ICU_INCLUDE_DIR unicode/ucnv.h + PATHS + /usr/include + /usr/include/x86_64-linux-gnu + /usr/local/include + /opt/local/include + CMAKE_FIND_ROOT_PATH_BOTH + ) + if ("${ICU_INCLUDE_DIR}" STREQUAL "ICU_INCLUDE_DIR-NOTFOUND") + message(FATAL_ERROR "ICU headers not found!") + endif() + endif() + if (CMAKE_CROSSCOMPILING) + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory + ${ICU_INCLUDE_DIR}/unicode + ${CMAKE_BINARY_DIR}/unicode + ) + set(ICU_INCLUDE_DIR ${CMAKE_BINARY_DIR}) + endif() + set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) + include_directories(${ICU_INCLUDE_DIRS}) +endif() + +################################################################################ +# # configure # ################################################################################ @@ -160,24 +196,6 @@ endif() if (UNIX) - if (CMAKE_CROSSCOMPILING) - find_path(ICU_INCLUDE_DIR unicode/ucnv.h - PATHS - /usr/include - /usr/include/x86_64-linux-gnu - /usr/local/include - /opt/local/include - CMAKE_FIND_ROOT_PATH_BOTH - ) - if (ICU_INCLUDE_DIR) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory - ${ICU_INCLUDE_DIR}/unicode - ${CMAKE_BINARY_DIR}/unicode - ) - include_directories(${CMAKE_BINARY_DIR}) - endif() - endif() - set(OS_DIR posix) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") Modified: firebird/trunk/src/common/classes/alloc.h =================================================================== --- firebird/trunk/src/common/classes/alloc.h 2015-02-07 14:58:31 UTC (rev 60648) +++ firebird/trunk/src/common/classes/alloc.h 2015-02-07 16:07:04 UTC (rev 60649) @@ -48,7 +48,7 @@ #include <stdio.h> -#if defined(MVS) || defined (DARWIN) +#if defined(MVS) || defined(DARWIN) || defined(__clang__) #include <stdlib.h> #else #include <malloc.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |