[sword-svn] r3277 - in branches/sword-1-7-x: . cmake
greg.hellings at crosswire.org
greg.hellings at crosswire.org
Tue Dec 2 23:01:43 MST 2014
Author: greg.hellings
Date: 2014-12-02 23:01:43 -0700 (Tue, 02 Dec 2014)
New Revision: 3277
Modified:
branches/sword-1-7-x/
branches/sword-1-7-x/CMakeLists.txt
branches/sword-1-7-x/cmake/FindICU.cmake
branches/sword-1-7-x/cmake/sources.cmake
Log:
Merging r3233
Property changes on: branches/sword-1-7-x
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:2989-2991,2997,3001-3004,3006,3010-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3108,3110,3115,3118-3121,3126-3127,3131-3135,3140,3144,3151,3153-3155,3190-3192,3198-3199,3202-3203,3225,3230,3232
+ /trunk:2989-2991,2997,3001-3004,3006,3010-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3108,3110,3115,3118-3121,3126-3127,3131-3135,3140,3144,3151,3153-3155,3190-3192,3198-3199,3202-3203,3225,3230,3232-3233
Modified: branches/sword-1-7-x/CMakeLists.txt
===================================================================
--- branches/sword-1-7-x/CMakeLists.txt 2014-12-03 05:59:49 UTC (rev 3276)
+++ branches/sword-1-7-x/CMakeLists.txt 2014-12-03 06:01:43 UTC (rev 3277)
@@ -38,6 +38,7 @@
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/include") # For everything else
IF(MSVC)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/src/utilfuns/win32/")
+ ADD_DEFINITIONS(-DWIN32 -D_ICUSWORD_ -D_LIB -DREGEX_MALLOC -DSWMAKINGDLL -D_CRT_SECURE_NO_WARNINGS -DCURL_STATICLIB -DUSBINARY -D_CRT_SECURE_NO_DEPRECATE)
ENDIF(MSVC)
###########################################################################################
@@ -46,10 +47,21 @@
#
MESSAGE(STATUS "\n-- SEARCHING FOR SYTEM PACKAGES")
# Find our packages
+IF(MSVC)
+ FIND_PACKAGE(BZIP2 REQUIRED)
+ FIND_PACKAGE(XZ REQUIRED)
+ FIND_PACKAGE(ICU REQUIRED)
+ FIND_PACKAGE(CURL REQUIRED)
+ELSE(MSVC)
+ FIND_PACKAGE(BZIP2 QUIET)
+ FIND_PACKAGE(XZ QUIET)
+ FIND_PACKAGE(ICU QUIET)
+ FIND_PACKAGE(CURL QUIET)
+ENDIF(MSVC)
+FIND_PACKAGE(CLucene QUIET)
FIND_PACKAGE(ZLIB QUIET)
FIND_PACKAGE(ICU QUIET)
FIND_PACKAGE(CURL QUIET)
-FIND_PACKAGE(CLucene QUIET)
FIND_PACKAGE(PkgConfig QUIET)
FIND_PACKAGE(Regex QUIET)
@@ -153,13 +165,21 @@
TARGET_LINK_LIBRARIES(libsword fnccheck)
ENDIF(SWORD_ENABLE_PROFILEFN STREQUAL "Yes")
-SET(CMAKE_C_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_C_FLAGS}")
-SET(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS}")
-SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_C_FLAGS}")
-SET(CMAKE_CXX_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_CXX_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}")
-
+IF(MSVC)
+ SET(CMAKE_C_FLAGS_DEBUG "/D -Wall /O0 /DDEBUG ${CMAKE_C_FLAGS}")
+ SET(CMAKE_C_FLAGS_RELEASE "/O3 /DNDEBUG ${CMAKE_C_FLAGS}")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/O3 /D /DDEBUG ${CMAKE_C_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_DEBUG "/D -Wall /O0 /DDEBUG ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_RELEASE "/O3 ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O3 /D /DDEBUG ${CMAKE_CXX_FLAGS}")
+ELSE(MSVC)
+ SET(CMAKE_C_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_C_FLAGS}")
+ SET(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS}")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_C_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_DEBUG "-g3 -Wall -O0 ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}")
+ENDIF(MSVC)
##############################################################################################
# Setting libraries and includes
#
Modified: branches/sword-1-7-x/cmake/FindICU.cmake
===================================================================
--- branches/sword-1-7-x/cmake/FindICU.cmake 2014-12-03 05:59:49 UTC (rev 3276)
+++ branches/sword-1-7-x/cmake/FindICU.cmake 2014-12-03 06:01:43 UTC (rev 3277)
@@ -34,7 +34,14 @@
ICU_I18N_LIBRARY
NAMES icuin icui18n cygicuin cygicuin32
DOC "Libraries to link against for ICU internationalization")
+ if(MSVC)
+ find_library(ICU_DATA_LIBRARY
+ NAMES icudt
+ DOC "Libraries to link against for ICU data")
+ set(ICU_LIBRARIES ${ICU_LIBRARIES} ${ICU_DATA_LIBRARY})
+ endif(MSVC)
mark_as_advanced(ICU_I18N_LIBRARY)
+ mark_as_advanced(ICU_DATA_LIBRARY)
if (ICU_I18N_LIBRARY)
set(ICU_I18N_FOUND 1)
set(ICU_I18N_LIBRARIES ${ICU_I18N_LIBRARY})
@@ -49,3 +56,13 @@
set(ICU_I18N_LIBRARIES)
set(ICU_INCLUDE_DIRS)
endif(ICU_INCLUDE_DIR AND ICU_LIBRARY)
+
+IF(ICU_FOUND)
+ IF(NOT ICU_FIND_QUIETLY)
+ MESSAGE(STATUS "ICU: Yes ${ICU_I18N_LIBRARY}")
+ ENDIF(NOT ICU_FIND_QUIETLY)
+ELSE(ICU_FOUND)
+ IF(ICU_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "ICU: No")
+ ENDIF(ICU_FIND_REQUIRED)
+ENDIF(ICU_FOUND)
Modified: branches/sword-1-7-x/cmake/sources.cmake
===================================================================
--- branches/sword-1-7-x/cmake/sources.cmake 2014-12-03 05:59:49 UTC (rev 3276)
+++ branches/sword-1-7-x/cmake/sources.cmake 2014-12-03 06:01:43 UTC (rev 3277)
@@ -168,6 +168,11 @@
)
SOURCE_GROUP("src\\utilfns" FILES ${sword_base_utilfns_SOURCES})
+SET(sword_base_msvc_SOURCES
+ src/utilfuns/win32/dirent.cpp
+)
+SOURCE_GROUP("src\\utilfns\\win32" FILES ${sword_base_msvc_SOURCES})
+
SET(sword_base_binding_SOURCES
bindings/flatapi.cpp
)
@@ -179,9 +184,20 @@
${sword_base_mgr_SOURCES}
${sword_base_module_SOURCES}
${sword_base_utilfns_SOURCES}
- ${sword_base_binding_SOURCES}
)
+IF(NOT MSVC)
+ SET(sword_base_SOURCES
+ ${sword_base_SOURCES}
+ ${sword_base_binding_SOURCES}
+ )
+ELSE(NOT MSVC)
+ SET(sword_base_SOURCES
+ ${sword_base_SOURCES}
+ ${sword_base_msvc_SOURCES}
+ )
+ENDIF(NOT MSVC)
+
# Sources relying on ZLib
SET(sword_zlib_used_SOURCES
src/modules/common/zipcomprs.cpp
More information about the sword-cvs
mailing list