diff options
author | adrido <robots_only_adrido@gmx.com> | 2019-03-02 10:56:01 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2019-03-02 10:56:01 +0100 |
commit | ad0f20835cd4f64f5d47f537125e9e3157717beb (patch) | |
tree | 9ace1dc2ea6fadb77762712327cf504db3004bbf | |
parent | ed784993f42ae1f804f0fdf2a99a3d598c0c0657 (diff) | |
download | minetest-ad0f20835cd4f64f5d47f537125e9e3157717beb.tar.gz minetest-ad0f20835cd4f64f5d47f537125e9e3157717beb.tar.bz2 minetest-ad0f20835cd4f64f5d47f537125e9e3157717beb.zip |
Don't include and link to gettext if gettext is not found (#8305)
-rw-r--r-- | src/CMakeLists.txt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ee67a83e2..764706776 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -509,7 +509,6 @@ include_directories( ${ZLIB_INCLUDE_DIR} ${CMAKE_BUILD_TYPE} ${PNG_INCLUDE_DIR} - ${GETTEXT_INCLUDE_DIR} ${SOUND_INCLUDE_DIRS} ${SQLITE3_INCLUDE_DIR} ${LUA_INCLUDE_DIR} @@ -519,6 +518,9 @@ include_directories( ${PROJECT_SOURCE_DIR}/script ) +if(USE_GETTEXT) + include_directories(${GETTEXT_INCLUDE_DIR}) +endif() if(USE_FREETYPE) include_directories(${FREETYPE_INCLUDE_DIRS}) @@ -544,7 +546,6 @@ if(BUILD_CLIENT) ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${X11_LIBRARIES} - ${GETTEXT_LIBRARY} ${SOUND_LIBRARIES} ${SQLITE3_LIBRARY} ${LUA_LIBRARY} @@ -564,6 +565,12 @@ if(BUILD_CLIENT) ${client_LIBS} ) endif() + if(USE_GETTEXT) + target_link_libraries( + ${PROJECT_NAME} + ${GETTEXT_LIBRARY} + ) + endif() if(USE_CURL) target_link_libraries( ${PROJECT_NAME} @@ -608,13 +615,15 @@ if(BUILD_SERVER) ${ZLIB_LIBRARIES} ${SQLITE3_LIBRARY} ${JSON_LIBRARY} - ${GETTEXT_LIBRARY} ${LUA_LIBRARY} ${GMP_LIBRARY} ${PLATFORM_LIBS} ) set_target_properties(${PROJECT_NAME}server PROPERTIES COMPILE_DEFINITIONS "SERVER") + if (USE_GETTEXT) + target_link_libraries(${PROJECT_NAME}server ${GETTEXT_LIBRARY}) + endif() if (USE_CURSES) target_link_libraries(${PROJECT_NAME}server ${CURSES_LIBRARIES}) endif() |