aboutsummaryrefslogtreecommitdiff
path: root/NvBlast/samples/compiler/cmake/windows
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-02-21 12:07:59 -0800
committerBryan Galdrikian <[email protected]>2017-02-21 12:07:59 -0800
commit446ce137c6823ba9eff273bdafdaf266287c7c98 (patch)
treed20aab3e2ed08d7b3ca71c2f40db6a93ea00c459 /NvBlast/samples/compiler/cmake/windows
downloadblast-1.0.0-beta.tar.xz
blast-1.0.0-beta.zip
first commitv1.0.0-beta
Diffstat (limited to 'NvBlast/samples/compiler/cmake/windows')
-rw-r--r--NvBlast/samples/compiler/cmake/windows/CMakeLists.txt52
-rw-r--r--NvBlast/samples/compiler/cmake/windows/SampleAssetViewer-AT.cmake7
-rw-r--r--NvBlast/samples/compiler/cmake/windows/SampleAssetViewer.cmake25
-rw-r--r--NvBlast/samples/compiler/cmake/windows/SampleBase-AT.cmake7
-rw-r--r--NvBlast/samples/compiler/cmake/windows/SampleBase.cmake21
5 files changed, 112 insertions, 0 deletions
diff --git a/NvBlast/samples/compiler/cmake/windows/CMakeLists.txt b/NvBlast/samples/compiler/cmake/windows/CMakeLists.txt
new file mode 100644
index 0000000..6820dde
--- /dev/null
+++ b/NvBlast/samples/compiler/cmake/windows/CMakeLists.txt
@@ -0,0 +1,52 @@
+#Platform specific compile flags and project includes
+
+#NOTE: Warnings lowered on the sample projects as it's got a lot of warnings. Defines below hide more.
+SET(CMAKE_CXX_FLAGS "/GR- /GF /MP /Gy /EHsc /d2Zi+ /errorReport:prompt /fp:fast /Gd /Gm- /GS- /nologo /W3 /WX /Zc:forScope /Zc:inline /Zc:wchar_t /Zi")
+
+# Are we using the static or dynamic RT library? Whatever we use, it needs to be the same in any dependencies
+# we pull in or we're potentially having mismatch issues.
+IF(STATIC_WINCRT)
+ SET(WINCRT_NDEBUG "/MT")
+ SET(WINCRT_DEBUG "/MTd")
+ELSE()
+ SET(WINCRT_NDEBUG "/MD")
+ SET(WINCRT_DEBUG "/MDd")
+ENDIF()
+
+SET(CMAKE_CXX_FLAGS_DEBUG "/Od /RTCsu ${WINCRT_DEBUG}")
+SET(CMAKE_CXX_FLAGS_CHECKED "/Ox ${WINCRT_NDEBUG}")
+SET(CMAKE_CXX_FLAGS_PROFILE "/Ox ${WINCRT_NDEBUG}")
+SET(CMAKE_CXX_FLAGS_RELEASE "/Ox ${WINCRT_NDEBUG}")
+
+# Build PDBs for all configurations
+SET(CMAKE_SHARED_LINKER_FLAGS "/DEBUG")
+
+IF(CMAKE_CL_64)
+ ADD_DEFINITIONS(-DWIN64)
+ENDIF(CMAKE_CL_64)
+
+SET(SAMPLES_SLN_COMPILE_DEFS _UNICODE;UNICODE;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_ALLOW_RUNTIME_LIBRARY_MISMATCH;__GFSDK_DX11__;)
+#NvBlastExt doesn't have the _CONSOLE flag
+
+SET(SAMPLES_SLN_DEBUG_COMPILE_DEFS _DEBUG;NV_DEBUG=1;)
+SET(SAMPLES_SLN_CHECKED_COMPILE_DEFS NDEBUG;NV_CHECKED=1;)
+SET(SAMPLES_SLN_PROFILE_COMPILE_DEFS NDEBUG;NV_PROFILE=1;)
+SET(SAMPLES_SLN_RELEASE_COMPILE_DEFS NDEBUG;)
+
+IF(CMAKE_CL_64)
+ SET(LIBPATH_SUFFIX "x64")
+ELSE(CMAKE_CL_64)
+ SET(LIBPATH_SUFFIX "x86")
+ENDIF(CMAKE_CL_64)
+
+SET(CMAKE_DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}_${LIBPATH_SUFFIX}")
+SET(CMAKE_PROFILE_POSTFIX "${CMAKE_PROFILE_POSTFIX}_${LIBPATH_SUFFIX}")
+SET(CMAKE_CHECKED_POSTFIX "${CMAKE_CHECKED_POSTFIX}_${LIBPATH_SUFFIX}")
+SET(CMAKE_RELEASE_POSTFIX "${CMAKE_RELEASE_POSTFIX}_${LIBPATH_SUFFIX}")
+
+
+# Include all of the projects
+INCLUDE(${PROJECT_CMAKE_FILES_DIR}/SampleBase.cmake)
+INCLUDE(${PROJECT_CMAKE_FILES_DIR}/SampleAssetViewer.cmake)
+
+
diff --git a/NvBlast/samples/compiler/cmake/windows/SampleAssetViewer-AT.cmake b/NvBlast/samples/compiler/cmake/windows/SampleAssetViewer-AT.cmake
new file mode 100644
index 0000000..d0defc9
--- /dev/null
+++ b/NvBlast/samples/compiler/cmake/windows/SampleAssetViewer-AT.cmake
@@ -0,0 +1,7 @@
+# Copy the dlls from the deps
+
+ADD_CUSTOM_COMMAND(TARGET SampleAssetViewer POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${PXSHAREDSDK_DLLS} ${PHYSXSDK_DLLS}
+ ${BL_EXE_OUTPUT_DIR}
+)
diff --git a/NvBlast/samples/compiler/cmake/windows/SampleAssetViewer.cmake b/NvBlast/samples/compiler/cmake/windows/SampleAssetViewer.cmake
new file mode 100644
index 0000000..172b2ea
--- /dev/null
+++ b/NvBlast/samples/compiler/cmake/windows/SampleAssetViewer.cmake
@@ -0,0 +1,25 @@
+#
+# Build SampleAssetViewer Windows
+#
+
+SET(SAMPLEASSETVIEWER_PLATFORM_COMMON_FILES
+)
+
+SET(SAMPLEASSETVIEWER_PLATFORM_INCLUDES
+)
+
+SET(SAMPLEASSETVIEWER_COMPILE_DEFS
+ # Common to all configurations
+ ${SAMPLES_SLN_COMPILE_DEFS}
+
+ $<$<CONFIG:debug>:${SAMPLES_SLN_DEBUG_COMPILE_DEFS}>
+ $<$<CONFIG:checked>:${SAMPLES_SLN_CHECKED_COMPILE_DEFS}>
+ $<$<CONFIG:profile>:${SAMPLES_SLN_PROFILE_COMPILE_DEFS}>
+ $<$<CONFIG:release>:${SAMPLES_SLN_RELEASE_COMPILE_DEFS}>
+)
+
+SET(SAMPLEASSETVIEWER_LINK_FLAGS "/SUBSYSTEM:WINDOWS")
+
+
+#TARGET_LINK_LIBRARIES(NvBlast PUBLIC ${NVTOOLSEXT_LIBRARIES})
+#SET_TARGET_PROPERTIES(NvBlast PROPERTIES LINK_FLAGS "/MAP" )
diff --git a/NvBlast/samples/compiler/cmake/windows/SampleBase-AT.cmake b/NvBlast/samples/compiler/cmake/windows/SampleBase-AT.cmake
new file mode 100644
index 0000000..98d980b
--- /dev/null
+++ b/NvBlast/samples/compiler/cmake/windows/SampleBase-AT.cmake
@@ -0,0 +1,7 @@
+# Copy the dlls from the deps
+
+ADD_CUSTOM_COMMAND(TARGET SampleBase POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${PXSHAREDSDK_DLLS} ${PHYSXSDK_DLLS} ${SHADOW_LIB_DLL} ${HBAO_PLUS_DLL} ${D3DCOMPILER_DLL}
+ ${BL_EXE_OUTPUT_DIR}
+)
diff --git a/NvBlast/samples/compiler/cmake/windows/SampleBase.cmake b/NvBlast/samples/compiler/cmake/windows/SampleBase.cmake
new file mode 100644
index 0000000..19133c4
--- /dev/null
+++ b/NvBlast/samples/compiler/cmake/windows/SampleBase.cmake
@@ -0,0 +1,21 @@
+#
+# Build SampleBase Windows
+#
+
+SET(SAMPLEBASE_PLATFORM_COMMON_FILES
+)
+
+SET(SAMPLEBASE_PLATFORM_INCLUDES
+)
+
+SET(SAMPLEBASE_COMPILE_DEFS
+ # Common to all configurations
+ ${SAMPLES_SLN_COMPILE_DEFS}
+
+ $<$<CONFIG:debug>:${SAMPLES_SLN_DEBUG_COMPILE_DEFS}>
+ $<$<CONFIG:checked>:${SAMPLES_SLN_CHECKED_COMPILE_DEFS}>
+ $<$<CONFIG:profile>:${SAMPLES_SLN_PROFILE_COMPILE_DEFS}>
+ $<$<CONFIG:release>:${SAMPLES_SLN_RELEASE_COMPILE_DEFS}>
+)
+
+SET(SAMPLEBASE_ADDITIONAL_DLLS "")