Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: true
SpacesInSquareBrackets: false
<<<<<<< HEAD
Standard: Cpp11
=======
Standard: Cpp17
>>>>>>> template/carbonengine/resources-updates
TabWidth: 4
UseTab: ForContinuationAndIndentation
---
Expand Down Expand Up @@ -146,7 +150,14 @@ SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: true
SpacesInSquareBrackets: false
<<<<<<< HEAD
Standard: Cpp11
TabWidth: 4
UseTab: ForContinuationAndIndentation
...
=======
Standard: Cpp17
TabWidth: 4
UseTab: ForContinuationAndIndentation
...
>>>>>>> template/carbonengine/resources-updates
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
[*]
charset = utf-8
<<<<<<< HEAD
end_of_line = crlf
=======
end_of_line = lf
>>>>>>> template/carbonengine/resources-updates
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4
<<<<<<< HEAD
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
Expand Down Expand Up @@ -946,3 +951,25 @@ ij_python_wrap_long_lines = false

[{*.toml,Cargo.lock,Cargo.toml.orig,Gopkg.lock,Pipfile,poetry.lock}]
ij_toml_keep_indents_on_empty_lines = false
=======
trim_trailing_whitespace = true

[{*.yaml,*.yml,.clang-format,.clang-tidy,_clang-format}]
# In yaml, a two-space indent is used by default in many of the solutions we integrate with.
# Examples are GitHub Actions and Kubernetes
indent_size = 2

[{*.h,*.hpp,*.hxx,*.c,*.cpp,*.cxx}]
# .clang-format should take precedence, but for editors which do not do that we're adding those settings here, too.
indent_style = tab

[*.red]
# Those are yaml files, but do use a 4 space indent
indent_size = 4

[{*.markdown,*.md}]
# In markdown a [double whitespace at the end of a line acts as a line break](https://www.markdownguide.org/basic-syntax/#line-breaks).
# Even though it's controversial to use it for that purpose (there are alternatives like using the `<br />` html tag),
# let's not break it accidentally in files that already use the double whitespace.
trim_trailing_whitespace = false
>>>>>>> template/carbonengine/resources-updates
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
*.pch

# Compiled Dynamic libraries
<<<<<<< HEAD
=======
binaryCache/
>>>>>>> template/carbonengine/resources-updates
*.so
*.dylib
*.dll
Expand All @@ -29,6 +33,7 @@ __pycache__/
# User generated local cmake configuration
CMakeUserPresets.json

<<<<<<< HEAD

### IDE ###
# User generated local IDE configuration
Expand All @@ -37,3 +42,7 @@ CMakeUserPresets.json
### VCPKG ###
# Temporary measure which fixes build agent issue
vcpkg_registry_cache/
=======
.cmake-build*
cmake-build*
>>>>>>> template/carbonengine/resources-updates
4 changes: 4 additions & 0 deletions .teamcity/MacOS/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag
param("env.VCPKG_BINARY_SOURCES", "clear;x-aws,s3://vcpkg-binary-cache-static/cache/,readwrite")
param("env.X_VCPKG_REGISTRIES_CACHE", "%teamcity.build.checkoutDir%/%github_checkout_folder%/regcache")
param("env.CMAKE_BUILD_PARALLEL_LEVEL", "8")
<<<<<<< HEAD
param("env.CTEST_PARALLEL_LEVEL", "1")
=======
param("env.CTEST_PARALLEL_LEVEL", "8")
>>>>>>> template/carbonengine/resources-updates
}


Expand Down
14 changes: 14 additions & 0 deletions .teamcity/Windows/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ val Debug = CarbonBuildWindows("Debug Windows", "Debug", "x64-windows-debug")
val Internal = CarbonBuildWindows("Internal Windows", "Internal", "x64-windows-internal")
val TrinityDev = CarbonBuildWindows("TrinityDev Windows", "TrinityDev", "x64-windows-trinitydev")
val Release = CarbonBuildWindows("Release Windows", "Release", "x64-windows-release")
<<<<<<< HEAD
val ReleaseDevFeatures = CarbonBuildWindows("Release Windows with Dev Features", "Release", "x64-windows-release-with-dev-features")
=======
>>>>>>> template/carbonengine/resources-updates

object Project : Project({
id("Windows")
Expand All @@ -34,7 +37,10 @@ object Project : Project({
buildType(Internal)
buildType(TrinityDev)
buildType(Release)
<<<<<<< HEAD
buildType(ReleaseDevFeatures)
=======
>>>>>>> template/carbonengine/resources-updates
})


Expand Down Expand Up @@ -63,7 +69,11 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
param("env.VCPKG_BINARY_SOURCES", "clear;x-aws,s3://vcpkg-binary-cache-static/cache/,readwrite")
param("env.X_VCPKG_REGISTRIES_CACHE", "%teamcity.build.checkoutDir%/%github_checkout_folder%/regcache")
param("env.CMAKE_BUILD_PARALLEL_LEVEL", "8")
<<<<<<< HEAD
param("env.CTEST_PARALLEL_LEVEL", "1")
=======
param("env.CTEST_PARALLEL_LEVEL", "8")
>>>>>>> template/carbonengine/resources-updates
}

vcs {
Expand Down Expand Up @@ -91,7 +101,11 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
scriptContent = """
REM unfortunately ninja does not find the VS environment otherwise
REM NB: the exported PATH also contains the location where we installed sentry-cli, e.g. teamcity.agent.work.dir
<<<<<<< HEAD
call "%%ProgramFiles(x86)%%\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\vsdevcmd.bat" -arch=x64
=======
call "%env.VSDEV_BAT_PATH%" -arch=x64
>>>>>>> template/carbonengine/resources-updates
echo ##teamcity[setParameter name='env.INCLUDE' value='%%INCLUDE%%']
echo ##teamcity[setParameter name='env.LIB' value='%%LIB%%']
echo ##teamcity[setParameter name='env.LIBPATH' value='%%LIBPATH%%']
Expand Down
4 changes: 4 additions & 0 deletions .teamcity/_Self.kt/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot

object Project : Project({

<<<<<<< HEAD
description = "Build / Publish pipeline for https://github.com/carbonengine/resources"
=======
description = "Build / Publish pipeline for https://github.com/ccpgames/carbon-template"
>>>>>>> template/carbonengine/resources-updates

params {
/* before changing carbon_ref, make sure to disable automatic settings synchronization on teamcity */
Expand Down
4 changes: 4 additions & 0 deletions .teamcity/_Self.kt/buildTypes/CreateUniversalBuilds.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class UniversalBuild() : BuildType({
param("x64-bin-path", "bin/macOS/x64")
param("arm64-bin-path", "bin/macOS/arm64")
text("file-matchers",
<<<<<<< HEAD
"-m 'resources:%system.teamcity.build.workingDir%/bin' -m '*.so:%system.teamcity.build.workingDir%/lib' -m '*.dylib:%system.teamcity.build.workingDir%/lib' -m '*.a:%system.teamcity.build.workingDir%/lib'",
=======
"-m '*.so:%system.teamcity.build.workingDir%/lib' -m '*.dylib:%system.teamcity.build.workingDir%/lib' -m '*.a:%system.teamcity.build.workingDir%/lib'",
>>>>>>> template/carbonengine/resources-updates
label = "lipo-build matchers",
description = """
-m '*.so:lib' to tell the tool to lipo together .so files and output the fat binaries to lib/.
Expand Down
10 changes: 9 additions & 1 deletion .teamcity/_Self.kt/buildTypes/PublishToPerforce.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ class Publish(perforce_publish_path: String) : BuildType({
param("env.TC_BUILD_URL", "%teamcity.serverUrl%/viewLog.html?buildId=%teamcity.build.id%")
text("eve_branch_shortname", "", label = "Branch Name", description = """The name of the branch, for example MAINLINE""", display = ParameterDisplay.PROMPT, allowEmpty = false)
param("env.TC_BUILDID", "%teamcity.build.id%")
<<<<<<< HEAD
param("env.TC_BUILD_NUMBER", "Carbon Resources #%build.number%")
=======
param("env.TC_BUILD_NUMBER", "Carbon Template #%build.number%")
>>>>>>> template/carbonengine/resources-updates
param("env.P4PORT", "p4is.ccp.ad.local:1666")
param("env.TC_EVE_BRANCH_SHORTNAME", "%eve_branch_shortname%")
param("env.TC_EVE_PROJECT", "%project%")
Expand Down Expand Up @@ -259,4 +263,8 @@ class Publish(perforce_publish_path: String) : BuildType({
}
})

val PublishToPerforce = Publish("vendor/github.com/carbonengine/resources")
<<<<<<< HEAD
val PublishToPerforce = Publish("vendor/github.com/carbonengine/resources")
=======
val PublishToPerforce = Publish("vendor/github.com/ccpgames/carbon-template")
>>>>>>> template/carbonengine/resources-updates
6 changes: 6 additions & 0 deletions .teamcity/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<<<<<<< HEAD
<name>Carbon Resources Config DSL Script</name>
<groupId>Carbon_Resources</groupId>
<artifactId>Carbon_Resources_dsl</artifactId>
=======
<name>Carbon Template Config DSL Script</name>
<groupId>Carbon_Template</groupId>
<artifactId>Carbon_Template_dsl</artifactId>
>>>>>>> template/carbonengine/resources-updates
<version>1.0-SNAPSHOT</version>

<parent>
Expand Down
97 changes: 97 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
# Copyright © 2025 CCP ehf.

cmake_minimum_required(VERSION 3.31.0)
Expand Down Expand Up @@ -78,11 +79,23 @@ target_include_directories(resources
)

get_target_property(_SOURCES resources SOURCES)
=======
cmake_minimum_required(VERSION 3.16)
project(CarbonTemplateProject VERSION 1.0.0)

include(cmake/CcpBuildConfigurations.cmake)
include(cmake/CcpTargetConfigurations.cmake)

ccp_add_library(target_name SHARED)

get_target_property(_SOURCES target_name SOURCES)
>>>>>>> template/carbonengine/resources-updates
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}"
PREFIX "Sources"
FILES ${_SOURCES}
)

<<<<<<< HEAD
add_subdirectory(cli)

# Enable testing based on option set (on by default)
Expand All @@ -96,11 +109,24 @@ endif ()

# Provide an install target if this is the top level project only
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
=======
set_target_properties(target_name PROPERTIES OUTPUT_NAME "_target_name")

target_include_directories(target_name
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

# Provide an install target if this is the top level project only
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
>>>>>>> template/carbonengine/resources-updates
# Determine if/when to generate/build documentation. The rules are as follows:
# - If running locally - Build documentation is OFF by default
# - If running on a build agent (TeamCity) - Build documentation is ON by default
# - If -DBUILD_DOCUMENTATION=ON/OFF flag is explicitly set, use it.
set(BUILD_DOCUMENTATION_DEFAULT_FLAG OFF)
<<<<<<< HEAD
if (DEFINED ENV{TEAMCITY_VERSION})
set(BUILD_DOCUMENTATION_DEFAULT_FLAG ON)
endif ()
Expand All @@ -114,6 +140,22 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/doc/source)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/doc/build)

=======
if(DEFINED ENV{TEAMCITY_VERSION})
set(BUILD_DOCUMENTATION_DEFAULT_FLAG ON)
endif()
message(STATUS "Document generation settings: default=${BUILD_DOCUMENTATION_DEFAULT_FLAG}, option BUILD_DOCUMENTATION=${BUILD_DOCUMENTATION}")
option(BUILD_DOCUMENTATION "Build Documentation" ${BUILD_DOCUMENTATION_DEFAULT_FLAG})

if(BUILD_DOCUMENTATION)
# Set up sphinx build for Python autodoc comments.
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/doc/source)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/doc/build)

find_package(Python3 COMPONENTS Interpreter REQUIRED)
include(cmake/CcpDocsGenerator.cmake)

>>>>>>> template/carbonengine/resources-updates
create_carbon_docs_sphinx_target(
PYTHON_EXE ${Python3_EXECUTABLE}
VENV_NAME docs_generation_venv
Expand All @@ -126,6 +168,7 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
INSTALL_DESTINATION documentation
)

<<<<<<< HEAD
# Ensure that resources is built before Spinx target
add_dependencies(Sphinx resources)
endif ()
Expand All @@ -150,3 +193,57 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
)

endif ()
=======
add_dependencies(Sphinx target_name)
endif()


option(INSTALL_TO_MONOLITH "Install this package to a perforce branch vendor folder - provided for backwards compatability" OFF)
if (INSTALL_TO_MONOLITH)
include(cmake/CcpMonolithVendorConfig.cmake)
include(cmake/CcpPackageConfigHelpers.cmake)

# Install rule to ensure that our runtime and linker files are in the expected, platform-specific folders
install(
TARGETS target_name
EXPORT package_nameTarget
CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES}
LIBRARY DESTINATION ${CCP_VENDOR_LIB_PATH}
ARCHIVE DESTINATION ${CCP_VENDOR_LIB_PATH}
RUNTIME DESTINATION ${CCP_VENDOR_BIN_PATH}
)

# Generate target configuration for the monolith
configure_ccp_vendor_config_file(
TARGET target_name
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/package_nameConfig.cmake"
DEPENDENCIES ""
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/package_nameConfig.cmake DESTINATION .)
install(DIRECTORY python DESTINATION . FILES_MATCHING PATTERN "*.py")
else ()
# Install rule for available public headers
install(
TARGETS target_name
EXPORT package_nameTarget
CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/package_name
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

install(EXPORT package_nameTarget
DESTINATION share/package_name
FILE package_name.cmake
)

install(
FILES package_nameConfig.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/package_name)
endif()

install(DIRECTORY include DESTINATION . FILES_MATCHING PATTERN "*.h")

endif()
>>>>>>> template/carbonengine/resources-updates
Loading
Loading