Remove the STATIC option from the CMake file

Instead it just automatically does static linking if it detects MSYS
This commit is contained in:
Clownacy 2019-04-20 04:43:56 +01:00
parent 5cf7c95dd7
commit 014d128396

View file

@ -4,7 +4,6 @@ if ((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.
cmake_policy(SET CMP0069 NEW) cmake_policy(SET CMP0069 NEW)
endif() endif()
option(STATIC "Produce a statically-linked executable (good for Windows builds, so you don't need to bundle DLL files)" OFF)
option(JAPANESE "Enable the Japanese-language build" OFF) option(JAPANESE "Enable the Japanese-language build" OFF)
option(FIX_BUGS "Fix certain bugs (see src/Bug Fixes.txt)" OFF) option(FIX_BUGS "Fix certain bugs (see src/Bug Fixes.txt)" OFF)
option(NONPORTABLE "Enable bits of code that aren't portable, but are what the original game used" OFF) option(NONPORTABLE "Enable bits of code that aren't portable, but are what the original game used" OFF)
@ -311,9 +310,7 @@ if (MSVC)
# Shut up those stupid warnings # Shut up those stupid warnings
target_compile_definitions(CSE2 PRIVATE _CRT_SECURE_NO_WARNINGS) target_compile_definitions(CSE2 PRIVATE _CRT_SECURE_NO_WARNINGS)
else() elseif (MSYS)
# Find dependencies
if (STATIC)
# Fall back on pkg-config, since cmake's static support sucks # Fall back on pkg-config, since cmake's static support sucks
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
@ -336,7 +333,6 @@ else()
find_package(Freetype REQUIRED) find_package(Freetype REQUIRED)
endif() endif()
endif()
target_include_directories(CSE2 PRIVATE ${SDL2_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS}) target_include_directories(CSE2 PRIVATE ${SDL2_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS})
target_compile_options(CSE2 PRIVATE ${SDL2_CFLAGS_OTHER} ${FREETYPE_CFLAGS_OTHER}) target_compile_options(CSE2 PRIVATE ${SDL2_CFLAGS_OTHER} ${FREETYPE_CFLAGS_OTHER})