Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake|Windows: Looking for DirectX and EAX
- Loading branch information
Showing
11 changed files
with
98 additions
and
33 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
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,23 @@ | ||
if (WIN32 AND NOT TARGET DirectX) | ||
find_library (DIRECTX_GUID_LIBRARY dxguid | ||
HINTS | ||
${DIRECTX_DIR} | ||
# TODO: look in the registry? | ||
PATH_SUFFIXES Lib/x86 x86 | ||
) | ||
mark_as_advanced (DIRECTX_GUID_LIBRARY) | ||
if (NOT DIRECTX_GUID_LIBRARY) | ||
message (FATAL_ERROR "DirectX SDK not found. Set the DIRECTX_DIR variable.") | ||
endif () | ||
|
||
get_filename_component (_libDir ${DIRECTX_GUID_LIBRARY} DIRECTORY) | ||
get_filename_component (_incDir ${_libDir}/../../include REALPATH) | ||
|
||
add_library (DirectX INTERFACE) | ||
target_include_directories (DirectX INTERFACE ${_incDir}) | ||
target_link_libraries (DirectX INTERFACE | ||
${_libDir}/dinput8.lib | ||
${_libDir}/dsound.lib | ||
${DIRECTX_GUID_LIBRARY} | ||
) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
if (WIN32) | ||
set (_oldPath ${EAX2_LIBRARY}) | ||
find_library (EAX2_LIBRARY eax HINTS ${EAX2_DIR} PATH_SUFFIXES Libs "EAX 2.0 SDK/Libs") | ||
mark_as_advanced (EAX2_LIBRARY) | ||
if (NOT _oldPath STREQUAL EAX2_LIBRARY) | ||
if (EAX2_LIBRARY) | ||
message (STATUS "Looking for EAX 2 - found") | ||
else () | ||
message (STATUS "Looking for EAX 2 - not found") | ||
endif () | ||
endif () | ||
|
||
if (NOT TARGET EAX2) | ||
add_library (EAX2 INTERFACE) | ||
get_filename_component (_libDir ${EAX2_LIBRARY} DIRECTORY) | ||
target_include_directories (EAX2 INTERFACE ${_libDir}/../Include) | ||
target_link_libraries (EAX2 INTERFACE ${EAX2_LIBRARY} ${_libDir}/eaxguid.lib) | ||
get_filename_component (_dll ${_libDir}/../dll/eax.dll REALPATH) | ||
deng_install_library (${_dll}) | ||
endif () | ||
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