Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
c74810ca
Commit
c74810ca
authored
4 years ago
by
Nat Goodspeed
Browse files
Options
Downloads
Patches
Plain Diff
DRTVWR-476: Use find_library(dxguid) rather than find_path().
parent
89452cec
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/cmake/DirectX.cmake
+7
-5
7 additions, 5 deletions
indra/cmake/DirectX.cmake
with
7 additions
and
5 deletions
indra/cmake/DirectX.cmake
+
7
−
5
View file @
c74810ca
...
@@ -11,10 +11,11 @@ if (WINDOWS)
...
@@ -11,10 +11,11 @@ if (WINDOWS)
endif
(
DIRECTX_INCLUDE_DIR
)
endif
(
DIRECTX_INCLUDE_DIR
)
# dxhint isn't meant to be the hard-coded DIRECTX_LIBRARY_DIR, we're just
# dxhint isn't meant to be the hard-coded DIRECTX_LIBRARY_DIR, we're just
# suggesting it as a hint to the next find_path(). The version is embedded
# suggesting it as a hint to find_library(). The Windows SDK version number
# in the DIRECTX_INCLUDE_DIR path string after Include and Lib, which is why
# is embedded in the DIRECTX_INCLUDE_DIR path string after Include and Lib,
# we don't just append a relative path: if there are multiple versions
# which is why we don't just append a relative path: if there are multiple
# installed on the host, we need to be sure we're using THE SAME version.
# versions installed on the host, we need to be sure we're using THE SAME
# version.
string
(
REPLACE
"/Include/"
"/Lib/"
dxhint
"
${
DIRECTX_INCLUDE_DIR
}
"
)
string
(
REPLACE
"/Include/"
"/Lib/"
dxhint
"
${
DIRECTX_INCLUDE_DIR
}
"
)
if
(
ADDRESS_SIZE EQUAL 32
)
if
(
ADDRESS_SIZE EQUAL 32
)
set
(
archdir x86
)
set
(
archdir x86
)
...
@@ -22,7 +23,8 @@ if (WINDOWS)
...
@@ -22,7 +23,8 @@ if (WINDOWS)
set
(
archdir x64
)
set
(
archdir x64
)
endif
()
endif
()
string
(
APPEND dxhint
"/
${
archdir
}
"
)
string
(
APPEND dxhint
"/
${
archdir
}
"
)
find_path
(
DIRECTX_LIBRARY_DIR dxguid.lib HINTS
"
${
dxhint
}
"
)
find_library
(
DXGUID_LIBRARY dxguid HINTS
"
${
dxhint
}
"
)
get_filename_component
(
DIRECTX_LIBRARY_DIR
"
${
DXGUID_LIBRARY
}
"
DIRECTORY
)
if
(
DIRECTX_LIBRARY_DIR
)
if
(
DIRECTX_LIBRARY_DIR
)
if
(
NOT DIRECTX_FIND_QUIETLY
)
if
(
NOT DIRECTX_FIND_QUIETLY
)
message
(
STATUS
"Found DirectX library:
${
DIRECTX_LIBRARY_DIR
}
"
)
message
(
STATUS
"Found DirectX library:
${
DIRECTX_LIBRARY_DIR
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment