summaryrefslogtreecommitdiff
path: root/cmake/FindDirectXTK.cmake
diff options
context:
space:
mode:
authorJason Maskell <[email protected]>2016-05-16 15:00:36 +0200
committerJason Maskell <[email protected]>2016-05-16 15:00:36 +0200
commit3eb017d032e0c542401ea202f7a62b7c7ddcd498 (patch)
tree6470077bdc344f1493778976917f7217a3159707 /cmake/FindDirectXTK.cmake
parentProject now compiles with Cmake. (diff)
downloadwaveworks_archive-3eb017d032e0c542401ea202f7a62b7c7ddcd498.tar.xz
waveworks_archive-3eb017d032e0c542401ea202f7a62b7c7ddcd498.zip
Added the test_d3d11 app to the solution. Not compiling yet, mostly a paranoia commit.
Diffstat (limited to 'cmake/FindDirectXTK.cmake')
-rw-r--r--cmake/FindDirectXTK.cmake39
1 files changed, 39 insertions, 0 deletions
diff --git a/cmake/FindDirectXTK.cmake b/cmake/FindDirectXTK.cmake
new file mode 100644
index 0000000..21ecbe3
--- /dev/null
+++ b/cmake/FindDirectXTK.cmake
@@ -0,0 +1,39 @@
+# Find DirectXTK
+
+include(FindPackageHandleStandardArgs)
+
+if (CMAKE_CL_64)
+ set(DXTKARCH "x64")
+else()
+ set(DXTKARCH "Win32")
+endif()
+
+find_path(DXTK_SDK_PATH DirectXHelpers.h
+ HINTS ${GW_DEPS_ROOT}/DirectXTK/Inc
+ )
+
+find_library(DXTK_LIBRARY_RELEASE
+ NAMES DirectXTK
+ PATHS ${DXTK_SDK_PATH}/Bin/*/${DXTKARCH}/Release)
+
+find_library(DXTK_LIBRARY_DEBUG
+ NAMES DirectXTK
+ PATHS ${DXTK_SDK_PATH}/Bin/*/${DXTKARCH}/Debug)
+
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXTK
+ DEFAULT_MSG
+ DXTK_LIBRARY_RELEASE
+ DXTK_SDK_PATH)
+
+if(DXTK_FOUND)
+ mark_as_advanced(DXTK_SDK_PATH DXTK_LIBRARY_RELEASE DXTK_LIBRARY_DEBUG)
+ set(DXTK_INCLUDE_DIRS
+ ${DXTK_SDK_PATH}/inc
+ CACHE STRING "")
+
+ set(DXTK_LIBRARIES
+ optimized ${DXTK_LIBRARY_RELEASE}
+ debug ${DXTK_LIBRARY_DEBUG}
+ CACHE STRING "")
+endif() \ No newline at end of file