diff --git a/CMakeLists.txt b/CMakeLists.txt index c6fb398274a..9c5af1a3990 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,9 +20,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) find_package(SDL 1.2.7 REQUIRED) find_package(Boost 1.35 REQUIRED COMPONENTS iostreams regex) -# yes, gettext is *required* even when NLS is deactivated (this is to compile + +# no, gettext executables are not required when NLS is deactivated +find_package(Gettext) +# yes, libintl is *required* even when NLS is deactivated (this is to compile # src/gettext.cpp since it includes libintl.h) -find_package(Gettext REQUIRED) +find_package(Libintl REQUIRED) find_package(X11) diff --git a/changelog b/changelog index c706a195431..ef5588bc162 100644 --- a/changelog +++ b/changelog @@ -59,6 +59,7 @@ Version 1.9.3+svn: moved the file out of that subdirectory. * Add update-po4a-man and update-po4a-manual targets to cmake. * Added: Extra validate macro VALIDATE_WITH_DEV_MESSAGE. + * Fixed: Link to libintl with cmake (bug #17152). Version 1.9.3: * Campaigns: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 17e66ca7f7d..27d603795f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,6 +19,7 @@ include_directories( ${SDL_INCLUDE_DIR} ) include_directories( ${PANGOCAIRO_INCLUDE_DIRS} ) include_directories( ${GETTEXT_INCLUDE_DIR} ) include_directories( ${LIBDBUS_INCLUDE_DIRS} ) +include_directories( ${LIBINTL_INCLUDE_DIR} ) #optional dependencies if(SDLIMAGE_INCLUDE_DIR) @@ -82,6 +83,7 @@ set(game-external-libs ${PANGOCAIRO_LIBRARIES} ${FONTCONFIG_LIBRARIES} ${LIBDBUS_LIBRARIES} + ${LIBINTL_LIBRARIES} ) if(MSVC) @@ -103,7 +105,7 @@ if(USE_ANA_NETWORK) set(server-external-libs ${common-external-libs} ${ANA_LIBRARIES} - ) +) else(USE_ANA_NETWORK) set(server-external-libs ${common-external-libs} @@ -737,6 +739,7 @@ target_link_libraries(campaignd wesnoth-core ${server-external-libs} ${SDLNET_LIBRARY} # NEEDED with ANA + ${LIBINTL_LIBRARIES} ) set_target_properties(campaignd PROPERTIES OUTPUT_NAME ${BINARY_PREFIX}campaignd${BINARY_SUFFIX})