diff options
author | glx22 <glx@openttd.org> | 2021-03-03 19:48:32 +0100 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-03-04 16:22:58 +0100 |
commit | 1d79f55a46f498e6c4052abdfd11d87aaab87793 (patch) | |
tree | 3b58be961ac7856e4b6f282aae690291b799194b | |
parent | db0993f50096b4fec319523585a2d4f756735e17 (diff) | |
download | openttd-1d79f55a46f498e6c4052abdfd11d87aaab87793.tar.xz |
Fix: [CMake] Skip detection for unused libs for dedicated builds
-rw-r--r-- | CMakeLists.txt | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 728057ce8..9a85bd581 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,28 +119,31 @@ find_package(LibLZMA) find_package(LZO) find_package(PNG) -if(NOT WIN32) - find_package(Allegro) - if(NOT APPLE) - find_package(Freetype) - find_package(SDL2) - if(NOT SDL2_FOUND) - find_package(SDL) +if(NOT OPTION_DEDICATED) + if(NOT WIN32) + find_package(Allegro) + if(NOT APPLE) + find_package(Freetype) + find_package(SDL2) + if(NOT SDL2_FOUND) + find_package(SDL) + endif() + find_package(Fluidsynth) + find_package(Fontconfig) + find_package(ICU OPTIONAL_COMPONENTS i18n lx) endif() - find_package(Fluidsynth) - find_package(Fontconfig) - find_package(ICU OPTIONAL_COMPONENTS i18n lx) - else() - find_package(Iconv) - - find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox) - find_library(AUDIOUNIT_LIBRARY AudioUnit) - find_library(COCOA_LIBRARY Cocoa) - find_library(QUARTZCORE_LIBRARY QuartzCore) endif() endif() +if(APPLE) + find_package(Iconv) + + find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox) + find_library(AUDIOUNIT_LIBRARY AudioUnit) + find_library(COCOA_LIBRARY Cocoa) + find_library(QUARTZCORE_LIBRARY QuartzCore) +endif() -if(NOT EMSCRIPTEN) +if(NOT EMSCRIPTEN AND NOT OPTION_DEDICATED) find_package(OpenGL COMPONENTS OpenGL) endif() |