vulcast-vertical/cmake/common/bootstrap.cmake
Vulcast 0e83ab9eef Initial import from Aitum/obs-vertical-canvas v1.6.4
Forked for Vulcast branding changes.
Licensed under GPL-2.0.
2026-06-29 22:58:49 +01:00

82 lines
2.1 KiB
CMake

# Plugin bootstrap module
include_guard(GLOBAL)
# Map fallback configurations for optimized build configurations
# gersemi: off
set(
CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO
RelWithDebInfo
Release
MinSizeRel
None
""
)
set(
CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL
MinSizeRel
Release
RelWithDebInfo
None
""
)
set(
CMAKE_MAP_IMPORTED_CONFIG_RELEASE
Release
RelWithDebInfo
MinSizeRel
None
""
)
# gersemi: on
# Add common module directories to default search path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/common")
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec)
string(JSON _name GET ${buildspec} name)
string(JSON _website GET ${buildspec} website)
string(JSON _author GET ${buildspec} author)
string(JSON _email GET ${buildspec} email)
string(JSON _version GET ${buildspec} version)
string(JSON _bundleId GET ${buildspec} platformConfig macos bundleId)
string(JSON _uuidApp GET ${buildspec} uuids windowsApp)
set(PLUGIN_AUTHOR ${_author})
set(PLUGIN_WEBSITE ${_website})
set(PLUGIN_EMAIL ${_email})
set(PLUGIN_VERSION ${_version})
set(MACOS_BUNDLEID ${_bundleId})
set(UUID_APP ${_uuidApp})
string(REPLACE "." ";" _version_canonical "${_version}")
list(GET _version_canonical 0 PLUGIN_VERSION_MAJOR)
list(GET _version_canonical 1 PLUGIN_VERSION_MINOR)
list(GET _version_canonical 2 PLUGIN_VERSION_PATCH)
unset(_version_canonical)
include(buildnumber)
include(osconfig)
# Allow selection of common build types via UI
if(NOT CMAKE_GENERATOR MATCHES "(Xcode|Visual Studio .+)")
if(NOT CMAKE_BUILD_TYPE)
set(
CMAKE_BUILD_TYPE
"RelWithDebInfo"
CACHE STRING
"OBS build type [Release, RelWithDebInfo, Debug, MinSizeRel]"
FORCE
)
set_property(
CACHE CMAKE_BUILD_TYPE
PROPERTY STRINGS Release RelWithDebInfo Debug MinSizeRel
)
endif()
endif()
# Disable exports automatically going into the CMake package registry
set(CMAKE_EXPORT_PACKAGE_REGISTRY FALSE)
# Enable default inclusion of targets' source and binary directory
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)