aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt47
1 files changed, 18 insertions, 29 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 62d604820..8a6eabccc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -63,14 +63,13 @@ if(ENABLE_GETTEXT)
if(GETTEXTLIB_FOUND)
if(WIN32)
message(STATUS "GetText library: ${GETTEXT_LIBRARY}")
- message(STATUS "GetText DLL: ${GETTEXT_DLL}")
- message(STATUS "GetText iconv DLL: ${GETTEXT_ICONV_DLL}")
+ message(STATUS "GetText DLL(s): ${GETTEXT_DLL}")
endif()
set(USE_GETTEXT TRUE)
message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
endif(GETTEXTLIB_FOUND)
else()
- mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
+ mark_as_advanced(GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
message(STATUS "GetText disabled.")
endif()
@@ -268,8 +267,10 @@ if(WIN32)
if(ENABLE_SOUND)
set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL32.dll for installation (optional)")
set(OGG_DLL "" CACHE FILEPATH "Path to libogg.dll for installation (optional)")
- set(VORBIS_DLL "" CACHE FILEPATH "Path to libvorbis.dll for installation (optional)")
- set(VORBISFILE_DLL "" CACHE FILEPATH "Path to libvorbisfile.dll for installation (optional)")
+ set(VORBIS_DLL "" CACHE FILEPATH "Path to Vorbis DLLs for installation (optional)")
+ endif()
+ if(USE_GETTEXT)
+ set(GETTEXT_DLL "" CACHE FILEPATH "Path to Intl/Iconv DLLs for installation (optional)")
endif()
if(USE_LUAJIT)
set(LUA_DLL "" CACHE FILEPATH "Path to luajit-5.1.dll for installation (optional)")
@@ -712,7 +713,7 @@ if(MSVC)
# Flags that cannot be shared between cl and clang-cl
# https://clang.llvm.org/docs/UsersManual.html#clang-cl
- if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld")
# Disable pragma-pack warning
@@ -730,7 +731,7 @@ else()
else()
set(RELEASE_WARNING_FLAGS "")
endif()
- if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ if(CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Clang")
set(WARNING_FLAGS "${WARNING_FLAGS} -Wsign-compare")
endif()
@@ -767,7 +768,7 @@ else()
else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MATH_FLAGS}")
endif()
- endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
+ endif()
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall ${WARNING_FLAGS} ${OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall ${WARNING_FLAGS} ${OTHER_FLAGS}")
@@ -804,7 +805,7 @@ if(WIN32)
FILES_MATCHING PATTERN "*.dll")
else()
# Use the old-style way to install dll's
- if(USE_SOUND)
+ if(BUILD_CLIENT AND USE_SOUND)
if(OPENAL_DLL)
install(FILES ${OPENAL_DLL} DESTINATION ${BINDIR})
endif()
@@ -814,9 +815,6 @@ if(WIN32)
if(VORBIS_DLL)
install(FILES ${VORBIS_DLL} DESTINATION ${BINDIR})
endif()
- if(VORBISFILE_DLL)
- install(FILES ${VORBISFILE_DLL} DESTINATION ${BINDIR})
- endif()
endif()
if(CURL_DLL)
install(FILES ${CURL_DLL} DESTINATION ${BINDIR})
@@ -824,7 +822,7 @@ if(WIN32)
if(ZLIB_DLL)
install(FILES ${ZLIB_DLL} DESTINATION ${BINDIR})
endif()
- if(FREETYPE_DLL)
+ if(BUILD_CLIENT AND FREETYPE_DLL)
install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR})
endif()
if(SQLITE3_DLL)
@@ -836,6 +834,12 @@ if(WIN32)
if(LUA_DLL)
install(FILES ${LUA_DLL} DESTINATION ${BINDIR})
endif()
+ if(BUILD_CLIENT AND IRRLICHT_DLL)
+ install(FILES ${IRRLICHT_DLL} DESTINATION ${BINDIR})
+ endif()
+ if(BUILD_CLIENT AND USE_GETTEXT AND GETTEXT_DLL)
+ install(FILES ${GETTEXT_DLL} DESTINATION ${BINDIR})
+ endif()
endif()
endif()
@@ -863,6 +867,7 @@ if(BUILD_CLIENT)
endforeach()
endif()
+ # Install necessary fonts depending on configuration
if(USE_FREETYPE)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}"
FILES_MATCHING PATTERN "*.ttf" PATTERN "*.txt")
@@ -870,22 +875,6 @@ if(BUILD_CLIENT)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}"
FILES_MATCHING PATTERN "*.png" PATTERN "*.xml")
endif()
-
- if(WIN32)
- if(NOT VCPKG_APPLOCAL_DEPS)
- if(DEFINED IRRLICHT_DLL)
- install(FILES ${IRRLICHT_DLL} DESTINATION ${BINDIR})
- endif()
- if(USE_GETTEXT)
- if(DEFINED GETTEXT_DLL)
- install(FILES ${GETTEXT_DLL} DESTINATION ${BINDIR})
- endif()
- if(DEFINED GETTEXT_ICONV_DLL)
- install(FILES ${GETTEXT_ICONV_DLL} DESTINATION ${BINDIR})
- endif()
- endif()
- endif()
- endif()
endif(BUILD_CLIENT)
if(BUILD_SERVER)