mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
cmake: more logs for intl support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38750 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1e7e6fd8e9
commit
85733c6f6e
@ -51,7 +51,7 @@ LYX_OPTION_INIT()
|
|||||||
# Options for all compilers/systems
|
# Options for all compilers/systems
|
||||||
LYX_OPTION(CPACK "Use the CPack management (Implies LYX_INSTALL option)" OFF ALL)
|
LYX_OPTION(CPACK "Use the CPack management (Implies LYX_INSTALL option)" OFF ALL)
|
||||||
LYX_OPTION(INSTALL "Build install projects/rules (implies a bunch of other options)" OFF ALL)
|
LYX_OPTION(INSTALL "Build install projects/rules (implies a bunch of other options)" OFF ALL)
|
||||||
LYX_OPTION(NLS "Use nls" ON ALL)
|
LYX_OPTION(NLS "Enable Native Language Support (NLS)" ON ALL)
|
||||||
LYX_OPTION(ASPELL "Require aspell" OFF ALL)
|
LYX_OPTION(ASPELL "Require aspell" OFF ALL)
|
||||||
LYX_OPTION(ENCHANT "Require Enchant" OFF ALL)
|
LYX_OPTION(ENCHANT "Require Enchant" OFF ALL)
|
||||||
LYX_OPTION(HUNSPELL "Require Hunspell" OFF ALL)
|
LYX_OPTION(HUNSPELL "Require Hunspell" OFF ALL)
|
||||||
@ -306,7 +306,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
find_package(Qt4 REQUIRED)
|
find_package(Qt4 REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
|
|
||||||
include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src)
|
include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src)
|
||||||
|
|
||||||
@ -335,23 +335,22 @@ if(LYX_NLS)
|
|||||||
add_subdirectory(po "${TOP_BINARY_DIR}/po")
|
add_subdirectory(po "${TOP_BINARY_DIR}/po")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LYX_EXTERNAL_LIBINTL)
|
if(LYX_NLS)
|
||||||
find_package(Libintl REQUIRED)
|
if(LYX_EXTERNAL_LIBINTL)
|
||||||
if(DEFINED LIBINTL_LIBRARIES)
|
find_package(Libintl REQUIRED)
|
||||||
# find getext when configuring
|
if(DEFINED LIBINTL_LIBRARIES)
|
||||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARIES})
|
# find getext when configuring
|
||||||
# on mac use iconv also form ports
|
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARIES})
|
||||||
get_filename_component(ICONV_RELATIVE_TO_LIBINTL ${LIBINTL_LIBRARIES} PATH)
|
# on mac use iconv also form ports
|
||||||
endif()
|
get_filename_component(ICONV_RELATIVE_TO_LIBINTL ${LIBINTL_LIBRARIES} PATH)
|
||||||
else()
|
endif()
|
||||||
if(LYX_NLS)
|
|
||||||
add_subdirectory(intl "${TOP_BINARY_DIR}/intl")
|
|
||||||
else()
|
else()
|
||||||
# do not compile if nls disabled
|
add_subdirectory(intl "${TOP_BINARY_DIR}/intl")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(ICONV REQUIRED)
|
find_package(ICONV REQUIRED)
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
if(LYX_EXTERNAL_BOOST)
|
if(LYX_EXTERNAL_BOOST)
|
||||||
message(STATUS "Searching for boost")
|
message(STATUS "Searching for boost")
|
||||||
@ -540,6 +539,22 @@ message(STATUS)
|
|||||||
LYX_OPTION_LIST_ALL(used)
|
LYX_OPTION_LIST_ALL(used)
|
||||||
|
|
||||||
|
|
||||||
|
if(LYX_NLS)
|
||||||
|
message(STATUS)
|
||||||
|
message(STATUS "Building Native Language Support (LYX_NLS is set), used libraries:")
|
||||||
|
message(STATUS)
|
||||||
|
message(STATUS " * intl")
|
||||||
|
message(STATUS " - header : ${LIBINTL_HEADER}")
|
||||||
|
message(STATUS " - library: ${LIBINTL_LIBRARIES}")
|
||||||
|
message(STATUS " * iconv")
|
||||||
|
message(STATUS " - header : ${ICONV_HEADER}")
|
||||||
|
message(STATUS " - library: ${ICONV_LIBRARY}")
|
||||||
|
message(STATUS " * zlib")
|
||||||
|
message(STATUS " - header : ${ZLIB_HEADER}")
|
||||||
|
message(STATUS " - library: ${ZLIB_LIBRARY}")
|
||||||
|
message(STATUS)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
|
set(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
|
set(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
|
||||||
FILE(STRINGS "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
FILE(STRINGS "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
|
@ -32,9 +32,12 @@ if (ICONV_INCLUDE_DIR)
|
|||||||
set(ICONV_FIND_QUIETLY TRUE)
|
set(ICONV_FIND_QUIETLY TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_path(ICONV_INCLUDE_DIR iconv.h
|
find_path(ICONV_INCLUDE_DIR iconv.h PATHS
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include)
|
/usr/local/include)
|
||||||
|
|
||||||
|
find_file(ICONV_HEADER iconv.h
|
||||||
|
PATHS ${ICONV_INCLUDE_DIR} NO_DEFAULT_PATH)
|
||||||
|
|
||||||
set(POTENTIAL_ICONV_LIBS iconv libiconv libiconv2)
|
set(POTENTIAL_ICONV_LIBS iconv libiconv libiconv2)
|
||||||
|
|
||||||
|
@ -22,6 +22,9 @@ endif(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND)
|
|||||||
|
|
||||||
find_path(LIBINTL_INCLUDE_DIR libintl.h)
|
find_path(LIBINTL_INCLUDE_DIR libintl.h)
|
||||||
|
|
||||||
|
find_file(LIBINTL_HEADER iconv.h
|
||||||
|
PATHS ${LIBINTL_INCLUDE_DIR} NO_DEFAULT_PATH)
|
||||||
|
|
||||||
set(LIBINTL_LIB_FOUND FALSE)
|
set(LIBINTL_LIB_FOUND FALSE)
|
||||||
|
|
||||||
if(LIBINTL_INCLUDE_DIR)
|
if(LIBINTL_INCLUDE_DIR)
|
||||||
|
@ -9,13 +9,22 @@ if (ZLIB_INCLUDE_DIR)
|
|||||||
set(ZLIB_FIND_QUIETLY TRUE)
|
set(ZLIB_FIND_QUIETLY TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_path(ZLIB_INCLUDE_DIR zlib.h
|
find_path(ZLIB_INCLUDE_DIR zlib.h PATHS
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
"${GNUWIN32_DIR}"/include)
|
"${GNUWIN32_DIR}"/include)
|
||||||
|
|
||||||
|
find_file(ZLIB_HEADER iconv.h
|
||||||
|
PATHS ${ZLIB_INCLUDE_DIR} NO_DEFAULT_PATH)
|
||||||
|
|
||||||
set(POTENTIAL_Z_LIBS z zlib zdll)
|
set(POTENTIAL_Z_LIBS z zlib zdll)
|
||||||
|
|
||||||
|
find_library(ZLIB_LIBRARY NAMES ${POTENTIAL_Z_LIBS}
|
||||||
|
PATHS
|
||||||
|
${ICONV_RELATIVE_TO_LIBINTL}
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
|
||||||
find_library(ZLIB_LIBRARY NAMES ${POTENTIAL_Z_LIBS}
|
find_library(ZLIB_LIBRARY NAMES ${POTENTIAL_Z_LIBS}
|
||||||
PATHS
|
PATHS
|
||||||
"C:\\Programme\\Microsoft Visual Studio 8\\VC\\lib"
|
"C:\\Programme\\Microsoft Visual Studio 8\\VC\\lib"
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
project(intl)
|
project(intl)
|
||||||
|
|
||||||
# libgnuintl.h.in => libintl.h
|
# libgnuintl.h.in => libintl.h
|
||||||
configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h.cmake" ${CMAKE_CURRENT_BINARY_DIR}/libgnuintl.h)
|
configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h.cmake" ${CMAKE_BINARY_DIR}/intl/libgnuintl.h)
|
||||||
configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h.cmake" ${CMAKE_CURRENT_BINARY_DIR}/libintl.h)
|
configure_file("${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/intl/libgnuintl.h.cmake" ${CMAKE_BINARY_DIR}/intl/libintl.h)
|
||||||
|
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
@ -50,8 +50,16 @@ if(ICONV_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(intl STATIC ${intl_sources} ${intl_headers})
|
add_library(intl STATIC ${intl_sources} ${intl_headers})
|
||||||
set(LIBINTL_LIBRARIES intl CACHE STRING "libintl library" FORCE)
|
|
||||||
|
|
||||||
|
get_target_property(libintl_location intl LOCATION)
|
||||||
|
set(LIBINTL_LIBRARIES ${libintl_location} CACHE STRING "libintl library" FORCE)
|
||||||
|
|
||||||
|
find_path(LIBINTL_INCLUDE_DIR intl/libintl.h
|
||||||
|
PATHS ${CMAKE_BINARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
find_file(LIBINTL_HEADER intl/libintl.h
|
||||||
|
PATHS ${CMAKE_BINARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
|
||||||
if(ICONV_FOUND)
|
if(ICONV_FOUND)
|
||||||
target_link_libraries(intl ${ICONV_LIBRARY})
|
target_link_libraries(intl ${ICONV_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user