summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJason Maskell <Jason Maskell>2016-07-26 16:21:57 +0700
committerJason Maskell <Jason Maskell>2016-07-26 16:21:57 +0700
commit9d3f79f7e7e68ca9e296368587ab22494ffaf19b (patch)
treeeaa4190d763f6504ba5ba91fe367c937406a2a45 /cmake
parentModified finders to take Visual Studio platform into account when finding lib... (diff)
downloadwaveworks_archive-9d3f79f7e7e68ca9e296368587ab22494ffaf19b.tar.xz
waveworks_archive-9d3f79f7e7e68ca9e296368587ab22494ffaf19b.zip
Added Packman support - now the GenerateProjects.bat uses Packman to pull dependencies specified in WaveWorksDependencies.xml
Finders of these dependencies are modified to look in the Packman repo.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindAntTweakBar.cmake2
-rw-r--r--cmake/FindDXUT.cmake2
-rw-r--r--cmake/FindDirectXTK.cmake2
-rw-r--r--cmake/FindFX11.cmake2
-rw-r--r--cmake/FindFXC.cmake33
5 files changed, 37 insertions, 4 deletions
diff --git a/cmake/FindAntTweakBar.cmake b/cmake/FindAntTweakBar.cmake
index a25e9a0..149494a 100644
--- a/cmake/FindAntTweakBar.cmake
+++ b/cmake/FindAntTweakBar.cmake
@@ -9,7 +9,7 @@ else()
endif()
find_path(ATB_PATH AntTweakBar.h
- HINTS ${GW_DEPS_ROOT}/AntTweakBar
+ HINTS ${GW_DEPS_ROOT}/AntTweakBar/${AntTweakBar_FIND_VERSION}
)
MESSAGE("ATB SDK ${ATB_PATH}")
diff --git a/cmake/FindDXUT.cmake b/cmake/FindDXUT.cmake
index 5825c07..f9bfdca 100644
--- a/cmake/FindDXUT.cmake
+++ b/cmake/FindDXUT.cmake
@@ -9,7 +9,7 @@ else()
endif()
find_path(DXUT_SDK_PATH Core/DXUT.h
- HINTS ${GW_DEPS_ROOT}/DXUT
+ HINTS ${GW_DEPS_ROOT}/DXUT/${DXUT_FIND_VERSION}
)
# Need to be smart and get the proper VS library here
diff --git a/cmake/FindDirectXTK.cmake b/cmake/FindDirectXTK.cmake
index 910cc11..cbf4fba 100644
--- a/cmake/FindDirectXTK.cmake
+++ b/cmake/FindDirectXTK.cmake
@@ -9,7 +9,7 @@ else()
endif()
find_path(DXTK_SDK_PATH Inc/DirectXHelpers.h
- HINTS ${GW_DEPS_ROOT}/DirectXTK/
+ HINTS ${GW_DEPS_ROOT}/DirectXTK/${DirectXTK_FIND_VERSION}
)
MESSAGE("DXTK SDK ${DXTK_SDK_PATH}")
diff --git a/cmake/FindFX11.cmake b/cmake/FindFX11.cmake
index b6e8cb0..9c3d2ba 100644
--- a/cmake/FindFX11.cmake
+++ b/cmake/FindFX11.cmake
@@ -9,7 +9,7 @@ else()
endif()
find_path(FX11_SDK_PATH Effect.h
- HINTS ${GW_DEPS_ROOT}/FX11
+ HINTS ${GW_DEPS_ROOT}/FX11/${FX11_FIND_VERSION}
)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 18.0.0.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.0.0)
diff --git a/cmake/FindFXC.cmake b/cmake/FindFXC.cmake
new file mode 100644
index 0000000..27ffd07
--- /dev/null
+++ b/cmake/FindFXC.cmake
@@ -0,0 +1,33 @@
+include(FindPackageHandleStandardArgs)
+
+set(_programfiles "")
+foreach(v "ProgramW6432" "ProgramFiles" "ProgramFiles(x86)")
+ if(DEFINED "ENV{${v}}")
+ file(TO_CMAKE_PATH "$ENV{${v}}" _env_programfiles)
+ list(APPEND _programfiles "${_env_programfiles}/Windows Kits/8.1/bin/x86")
+ unset(_env_programfiles)
+ endif()
+endforeach()
+
+# Can't use "$ENV{ProgramFiles(x86)}" to avoid violating CMP0053. See
+# http://public.kitware.com/pipermail/cmake-developers/2014-October/023190.html
+set (ProgramFiles_x86 "ProgramFiles(x86)")
+if ("$ENV{${ProgramFiles_x86}}")
+ set (ProgramFiles "$ENV{${ProgramFiles_x86}}")
+else ()
+ set (ProgramFiles "$ENV{ProgramFiles}")
+endif ()
+
+MESSAGE("Trying to find ${ProgramFiles}/Windows Kits/8.1/bin/x86 ${ProgramFiles}/Windows Kits/8.0/bin/x86")
+
+find_program (DirectX_FXC_EXECUTABLE fxc
+ HINTS ${_programfiles}
+
+ DOC "Path to fxc.exe executable."
+)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(FXC
+ DEFAULT_MSG
+ DirectX_FXC_EXECUTABLE
+)
+