mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 03:52:12 -04:00
more consistent installation of dependencies (#397)
* more consistent installation of dependencies * don't download SDL2 libs on MSYS * fix typo
This commit is contained in:
parent
63b7097601
commit
10a37d6e24
@ -59,7 +59,7 @@ check_symbol_exists(strsignal "string.h" HAVE_STRSIGNAL)
|
||||
# SDL2. On Windows, we use the official development library.
|
||||
find_package(SDL2 2.0.7)
|
||||
if(NOT SDL2_FOUND)
|
||||
if(WIN32)
|
||||
if(WIN32 AND NOT MSYS)
|
||||
message(STATUS "Downloading SDL2 Development Library...")
|
||||
if(MSVC)
|
||||
file(DOWNLOAD
|
||||
@ -86,7 +86,7 @@ endif()
|
||||
# SDL2_mixer. On Windows, we use the official development library.
|
||||
find_package(SDL2_mixer 2.0.2)
|
||||
if(NOT SDL2_MIXER_FOUND)
|
||||
if(WIN32)
|
||||
if(WIN32 AND NOT MSYS)
|
||||
message(STATUS "Downloading SDL2_mixer Development Library...")
|
||||
if(MSVC)
|
||||
file(DOWNLOAD
|
||||
@ -113,7 +113,7 @@ endif()
|
||||
# SDL2_net. On Windows, we use the official development library.
|
||||
find_package(SDL2_net)
|
||||
if(NOT SDL2_NET_FOUND)
|
||||
if(WIN32)
|
||||
if(WIN32 AND NOT MSYS)
|
||||
message(STATUS "Downloading SDL2_net Development Library...")
|
||||
if(MSVC)
|
||||
file(DOWNLOAD
|
||||
|
@ -180,7 +180,7 @@ target_compile_definitions(woof PRIVATE MINIZ_NO_ARCHIVE_APIS)
|
||||
|
||||
# Assemble library files.
|
||||
set(WOOF_DLLS "")
|
||||
if(WIN32 AND NOT MINGW)
|
||||
if(WIN32 AND NOT MSYS)
|
||||
# SDL2
|
||||
list(APPEND WOOF_DLLS "${SDL2_DLL_DIR}/SDL2.dll")
|
||||
|
||||
@ -214,14 +214,15 @@ else()
|
||||
endif()
|
||||
install(FILES ${WOOF_DLLS} DESTINATION .)
|
||||
|
||||
if(MINGW)
|
||||
# Try get dependencies in MSYS2 environment.
|
||||
if(MSYS)
|
||||
find_program(DLLTOOL_EXECUTABLE
|
||||
NAMES dlltool dlltool.exe
|
||||
)
|
||||
|
||||
find_library(MODPLUG libmodplug)
|
||||
|
||||
if (MODPLUG AND DLLTOOL_EXECUTABLE)
|
||||
if(MODPLUG AND DLLTOOL_EXECUTABLE)
|
||||
execute_process(COMMAND
|
||||
"${DLLTOOL_EXECUTABLE}" -I "${MODPLUG}"
|
||||
OUTPUT_VARIABLE MODPLUG_DLL_NAME
|
||||
@ -236,7 +237,7 @@ if(MINGW)
|
||||
|
||||
find_library(FLUIDSYNTH libfluidsynth)
|
||||
|
||||
if (FLUIDSYNTH AND DLLTOOL_EXECUTABLE)
|
||||
if(FLUIDSYNTH AND DLLTOOL_EXECUTABLE)
|
||||
execute_process(COMMAND
|
||||
"${DLLTOOL_EXECUTABLE}" -I "${FLUIDSYNTH}"
|
||||
OUTPUT_VARIABLE FLUIDSYNTH_DLL_NAME
|
||||
@ -249,10 +250,7 @@ if(MINGW)
|
||||
message(WARNING "Can't find libfluidsynth")
|
||||
endif()
|
||||
|
||||
install(CODE
|
||||
"set(MINGW_PATH \"${SDL2_DLL_DIR}\" \"${SDL2_MIXER_DLL_DIR}\"
|
||||
\"${SDL2_NET_DLL_DIR}\")"
|
||||
)
|
||||
install(CODE "set(MINGW_PATH \"${SDL2_DLL_DIR}\")")
|
||||
|
||||
install(CODE [[
|
||||
file(GET_RUNTIME_DEPENDENCIES
|
||||
|
Loading…
x
Reference in New Issue
Block a user