File tree Expand file tree Collapse file tree 2 files changed +38
-8
lines changed
Expand file tree Collapse file tree 2 files changed +38
-8
lines changed Original file line number Diff line number Diff line change 33
44cmake_minimum_required (VERSION 3.20)
55
6- if ("${CMAKE_SOURCE_DIR} " STREQUAL "${CMAKE_CURRENT_SOURCE_DIR} " )
7- message (FATAL_ERROR "SHMath should be built by the main CMakeLists using BUILD_SHMATH" )
6+ if (DEFINED DIRECTXMATH_VERSION)
7+ set (SHMATH_VERSION ${DIRECTXMATH_VERSION} )
8+ else ()
9+ set (SHMATH_VERSION 1.0.6)
810endif ()
911
1012project (DirectXSH
11- VERSION ${DIRECTXMATH_VERSION }
13+ VERSION ${SHMATH_VERSION }
1214 DESCRIPTION "C++ Spherical Harmonics Math Library"
1315 HOMEPAGE_URL "https://go.microsoft.com/fwlink/?LinkID=615560"
1416 LANGUAGES CXX)
1517
18+ if (CMAKE_VERSION VERSION_LESS 3.21)
19+ get_property (not_top DIRECTORY PROPERTY PARENT_DIRECTORY )
20+ if (not_top)
21+ set (PROJECT_IS_TOP_LEVEL false )
22+ else ()
23+ set (PROJECT_IS_TOP_LEVEL true )
24+ endif ()
25+ endif ()
26+
27+ if (PROJECT_IS_TOP_LEVEL)
28+ message (FATAL_ERROR "SHMath should be built by the main CMakeLists using BUILD_SHMATH" )
29+ endif ()
30+
1631option (BUILD_DX11 "Build with DirectX11 support" OFF )
1732
1833option (BUILD_DX12 "Build with DirectX12 support" OFF )
@@ -95,7 +110,7 @@ cmake_path(GET CMAKE_CURRENT_LIST_DIR PARENT_PATH DIRECTXMATH_PATH)
95110
96111write_basic_package_version_file(
97112 ${PACKAGE_NAME} -config-version .cmake
98- VERSION ${DIRECTXMATH_VERSION }
113+ VERSION ${SHMATH_VERSION }
99114 COMPATIBILITY AnyNewerVersion
100115 ARCH_INDEPENDENT)
101116
Original file line number Diff line number Diff line change 33
44cmake_minimum_required (VERSION 3.20)
55
6- if ("${CMAKE_SOURCE_DIR} " STREQUAL "${CMAKE_CURRENT_SOURCE_DIR} " )
7- message (FATAL_ERROR "XSDP should be built by the main CMakeLists using BUILD_XDSP" )
6+ if (DEFINED DIRECTXMATH_VERSION)
7+ set (XDSP_VERSION ${DIRECTXMATH_VERSION} )
8+ else ()
9+ set (XDSP_VERSION 3.0.0)
810endif ()
911
1012project (XDSP
11- VERSION ${DIRECTXMATH_VERSION }
13+ VERSION ${XDSP_VERSION }
1214 DESCRIPTION "XDSP Digital Signal Processing (DSP) for DirectXMath"
1315 HOMEPAGE_URL "https://go.microsoft.com/fwlink/?LinkID=615560"
1416 LANGUAGES CXX)
1517
18+ if (CMAKE_VERSION VERSION_LESS 3.21)
19+ get_property (not_top DIRECTORY PROPERTY PARENT_DIRECTORY )
20+ if (not_top)
21+ set (PROJECT_IS_TOP_LEVEL false )
22+ else ()
23+ set (PROJECT_IS_TOP_LEVEL true )
24+ endif ()
25+ endif ()
26+
27+ if (PROJECT_IS_TOP_LEVEL)
28+ message (FATAL_ERROR "XSDP should be built by the main CMakeLists using BUILD_XDSP" )
29+ endif ()
30+
1631#--- Library
1732set (LIBRARY_HEADERS XDSP.h)
1833
@@ -32,7 +47,7 @@ cmake_path(GET CMAKE_CURRENT_LIST_DIR PARENT_PATH DIRECTXMATH_PATH)
3247
3348write_basic_package_version_file(
3449 ${PACKAGE_NAME} -config-version .cmake
35- VERSION ${DIRECTXMATH_VERSION }
50+ VERSION ${XDSP_VERSION }
3651 COMPATIBILITY AnyNewerVersion
3752 ARCH_INDEPENDENT)
3853
You can’t perform that action at this time.
0 commit comments