Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake|Windows: Configuring the build for 32-bit Windows
Modified dependency finders to work on Windows.
- Loading branch information
Showing
21 changed files
with
255 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required (VERSION 3.0) | ||
project (DENG_DIRECTSOUND) | ||
include (../PluginConfig.cmake) | ||
|
||
include_directories (include) | ||
file (GLOB SOURCES src/*.cpp include/*.h) | ||
|
||
deng_add_plugin (audio_directsound ${SOURCES} api/dsdirectsound.def) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required (VERSION 3.0) | ||
project (DENG_WINMM) | ||
include (../PluginConfig.cmake) | ||
|
||
include_directories (include) | ||
file (GLOB SOURCES src/*.cpp include/*.h) | ||
|
||
deng_add_plugin (audio_winmm ${SOURCES} api/dswinmm.def) | ||
|
||
target_link_libraries (audio_winmm PRIVATE winmm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
if (NOT DEFINED AMETHYST_COMMAND) | ||
if (NOT AMETHYST_COMMAND) | ||
find_program (AMETHYST_COMMAND amethyst | ||
HINTS | ||
/usr/local/bin | ||
/usr/bin | ||
${AMETHYST_DIR} | ||
ENV PATH | ||
ENV HOME | ||
ENV HOMEPATH | ||
PATH_SUFFIXES | ||
bin | ||
amethyst/bin | ||
Amethyst/bin | ||
DOC "Amethyst document processor executable" | ||
) | ||
mark_as_advanced (AMETHYST_COMMAND) | ||
message (STATUS "Found Amethyst: ${AMETHYST_COMMAND}") | ||
endif () | ||
|
||
if (NOT AMETHYST_COMMAND STREQUAL AMETHYST_COMMAND-NOTFOUND) | ||
if (AMETHYST_COMMAND) | ||
message (STATUS "Found Amethyst: ${AMETHYST_COMMAND}") | ||
endif () | ||
else () | ||
set (AMETHYST_FOUND YES) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,62 @@ | ||
find_package (PkgConfig) | ||
find_package (PkgConfig QUIET) | ||
|
||
add_pkgconfig_interface_library (SDL2 OPTIONAL sdl2) | ||
add_pkgconfig_interface_library (SDL2_mixer OPTIONAL SDL2_mixer) | ||
if (PKG_CONFIG_FOUND) | ||
add_pkgconfig_interface_library (SDL2 OPTIONAL sdl2) | ||
add_pkgconfig_interface_library (SDL2_mixer OPTIONAL SDL2_mixer) | ||
elseif (WIN32) | ||
# Try to locate SDL2 from the local system (assuming Windows). | ||
set (_oldPath ${SDL2_LIBRARY}) | ||
find_library (SDL2_LIBRARY SDL2 HINTS ${SDL2_DIR} PATH_SUFFIXES lib/x86 lib) | ||
if (NOT SDL2_LIBRARY) | ||
message (FATAL_ERROR "SDL2 not found. Set the SDL2_DIR variable to help locate it.\n") | ||
endif () | ||
if (NOT _oldPath STREQUAL SDL2_LIBRARY) | ||
message (STATUS "Found SDL2: ${SDL2_LIBRARY}") | ||
endif () | ||
|
||
# Define the target. | ||
add_library (SDL2 INTERFACE) | ||
target_link_libraries (SDL2 INTERFACE ${SDL2_LIBRARY}) | ||
|
||
# Deduce the include directory. | ||
get_filename_component (_libDir ${SDL2_LIBRARY} DIRECTORY) | ||
get_filename_component (_incDir ${_libDir}/../../include REALPATH) | ||
|
||
target_include_directories (SDL2 INTERFACE ${_incDir}) | ||
deng_install_library (${_libDir}/SDL2.dll) | ||
|
||
# Also attempt to locate SLD2_mixer. | ||
set (_oldPath ${SDL_MIXER_LIBRARY}) | ||
find_library (SDL2_MIXER_LIBRARY SDL2_mixer | ||
HINTS ${SDL2_DIR} ${SDL2_MIXER_DIR} | ||
PATH_SUFFIXES lib/x86 lib | ||
) | ||
if (NOT _oldPath STREQUAL SDL2_MIXER_LIBRARY) | ||
message (STATUS "Found SDL2_mixer: ${SDL2_MIXER_LIBRARY}") | ||
endif () | ||
|
||
# Define the target. | ||
add_library (SDL2_mixer INTERFACE) | ||
target_link_libraries (SDL2_mixer INTERFACE ${SDL2_MIXER_LIBRARY}) | ||
|
||
# Deduce the include directory. | ||
get_filename_component (_libDir ${SDL2_MIXER_LIBRARY} DIRECTORY) | ||
get_filename_component (_incDir ${_libDir}/../../include REALPATH) | ||
|
||
target_include_directories (SDL2_mixer INTERFACE ${_incDir}) | ||
|
||
# There are multiple DLLs needed for deployment. | ||
file (GLOB _mixLibs ${_libDir}/*.dll) | ||
foreach (_lib IN LISTS _mixLibs) | ||
deng_install_library (${_lib}) | ||
endforeach (_lib) | ||
endif () | ||
|
||
if (NOT TARGET SDL2) | ||
add_definitions (-DDENG_NO_SDL) | ||
message (STATUS "SDL2 disabled (not found).") | ||
endif () | ||
if (NOT TARGET SDL2_mixer) | ||
add_definitions (-DDENG_DISABLE_SDLMIXER) | ||
message (STATUS "SDL2_mixer disabled (not found).") | ||
endif () |
Oops, something went wrong.