From 461ce4975d0e2ddd0bdbb7aa5715e0fb996ce50d Mon Sep 17 00:00:00 2001 From: Pentarctagon Date: Tue, 15 May 2018 16:16:09 -0500 Subject: [PATCH] Don't require SDL2 or OGL for building the servers. Requiring SDL2 was masking needing to add -lpthread explicitly. (cherry-picked from commit fd34fe849770de379096ac1ffe612fb22473a846) --- CMakeLists.txt | 8 +++++--- src/CMakeLists.txt | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28db1e3cbdd..8f012cae37b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,9 +76,11 @@ else() message(WARNING "You are cross-compiling. Skipping IEEE 754 test.") endif() -find_package(OpenGL REQUIRED) -find_package(GLEW REQUIRED) -find_package(SDL2 2.0.4 REQUIRED) +if(ENABLE_GAME OR ENABLE_TESTS) + find_package(OpenGL REQUIRED) + find_package(GLEW REQUIRED) + find_package(SDL2 2.0.4 REQUIRED) +endif(ENABLE_GAME OR ENABLE_TESTS) find_package(Crypto 1.0 REQUIRED) find_package(Boost 1.56 REQUIRED COMPONENTS iostreams program_options regex system random) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 953205adc00..e3b697e305c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,6 +101,7 @@ set(server-external-libs ${Boost_RANDOM_LIBRARY} ${CRYPTO_LIBRARY} ${MYSQL_LIBS} + -lpthread ) if(ENABLE_FRIBIDI AND FRIBIDI_FOUND)