mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
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:
46
deps_src/semver/CMakeLists.txt
Normal file
46
deps_src/semver/CMakeLists.txt
Normal 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()
|
||||
Reference in New Issue
Block a user