Skip to content

Commit c6cc281

Browse files
Merge pull request vsg-dev#1593 from dg0yt/cmakedefine
Use option/cmakedefine01 for VSG_SUPPORTS_ShaderCompiler/Windowing
2 parents 06c0ba4 + c1fba59 commit c6cc281

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ find_package(Threads REQUIRED)
4141
set(VSG_MAX_INSTRUMENTATION_LEVEL 1 CACHE STRING "Set the instrumentation level to build into the VSG library, 0 for off, 1 coarse grained, 2 medium, 3 fine grained." )
4242

4343
# Enable/disable shader compilation support that pulls in glslang
44-
set(VSG_SUPPORTS_ShaderCompiler 1 CACHE STRING "Optional shader compiler support, 0 for off, 1 for enabled." )
44+
option(VSG_SUPPORTS_ShaderCompiler "Optional shader compiler support" ON)
4545
if (VSG_SUPPORTS_ShaderCompiler)
4646

4747
# Try looking for glslang 15 first.
@@ -75,7 +75,7 @@ if (VSG_SUPPORTS_ShaderCompiler)
7575
endif()
7676
endif()
7777

78-
set(VSG_SUPPORTS_Windowing 1 CACHE STRING "Optional native windowing support providing a default implementation of vsg::Window::create(), 0 for off, 1 for enabled." )
78+
option(VSG_SUPPORTS_Windowing "Optional native windowing support providing a default implementation of vsg::Window::create()" ON)
7979
if (VSG_SUPPORTS_Windowing)
8080
if (ANDROID)
8181
set(FIND_DEPENDENCY_WINDOWING "")

src/vsg/core/Version.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ extern "C"
3737
#define VSG_MAX_INSTRUMENTATION_LEVEL @VSG_MAX_INSTRUMENTATION_LEVEL@
3838

3939
/// vsg::ShaderCompiler support enabled when 1, disabled when 0
40-
#define VSG_SUPPORTS_ShaderCompiler @VSG_SUPPORTS_ShaderCompiler@
40+
#cmakedefine01 VSG_SUPPORTS_ShaderCompiler
4141

4242
/// vsg::ShaderCompiler optimizer support enabled when 1, disabled when 0
4343
#cmakedefine01 VSG_SUPPORTS_ShaderOptimizer
4444

4545
/// Native Windowing support provided with vsg::Window::create(windowTraits) enabled when 1, disabled when 0
46-
#define VSG_SUPPORTS_Windowing @VSG_SUPPORTS_Windowing@
46+
#cmakedefine01 VSG_SUPPORTS_Windowing
4747

4848
struct VsgVersion
4949
{

0 commit comments

Comments
 (0)