Refactor folder (#10475)

Move many third-party components' source codes from the src folder to a new folder called deps_src. The goal is to make the code structure clearer and easier to navigate.
This commit is contained in:
SoftFever
2025-08-22 20:02:26 +08:00
committed by GitHub
parent 3808f7eb28
commit 883607e1d4
2083 changed files with 1163 additions and 19503 deletions

View File

@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.13)
project(semver)
# Create static library for semver
add_library(semver STATIC
semver.c
semver.h
)
# Set include directories for the library
target_include_directories(semver
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
# Set compile features
target_compile_features(semver PUBLIC c_std_99)
# Add any compile definitions if needed
target_compile_definitions(semver
PRIVATE
# Add any private definitions here
PUBLIC
# Add any public definitions here
)
# Set position independent code for static library
set_target_properties(semver PROPERTIES
POSITION_INDEPENDENT_CODE ON
)
# Create an alias for consistent naming
add_library(semver::semver ALIAS semver)
# Export the library for use by other projects
if(NOT BUILD_SHARED_LIBS)
set_target_properties(semver PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)
endif()
# Check if encoding_check function is available
if(COMMAND encoding_check)
encoding_check(semver)
endif()