Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Unicado Libraries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UNICADO
Unicado Libraries
Commits
db44a507
Commit
db44a507
authored
1 month ago
by
Florian Schültke
Browse files
Options
Downloads
Patches
Plain Diff
libraries (schueltke):
- update cmake for static release
parent
fc9b664b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+17
-3
17 additions, 3 deletions
CMakeLists.txt
with
17 additions
and
3 deletions
CMakeLists.txt
+
17
−
3
View file @
db44a507
...
...
@@ -35,7 +35,7 @@ option(BUILD_BLACKBOXTESTS "Use blackbox testing" OFF)
# Option for unit testing
option
(
BUILD_UNITTEST
"Use unit testing"
OFF
)
# Option to include system libraries in the package archive
option
(
PACKAGE_SYSTEM_LIBRARIES
"Include system libraries in the package archive"
O
N
)
option
(
PACKAGE_SYSTEM_LIBRARIES
"Include system libraries in the package archive"
O
FF
)
# Finally decide whether to build static or shared libraries
option
(
BUILD_SHARED_LIBS
"Build shared libraries"
OFF
)
...
...
@@ -50,6 +50,20 @@ else()
message
(
STATUS
"[
${
PROJECT_NAME
}
] -> Building static libraries"
)
endif
()
if
(
PACKAGE_SYSTEM_LIBRARIES
)
if
(
BUILD_SHARED_LIBS
)
get_filename_component
(
SYSTEM_LIBS_PATH
${
CMAKE_CXX_COMPILER
}
PATH
)
message
(
STATUS
"[
${
PROJECT_NAME
}
] -> Packaging System Libraries from:
${
SYSTEM_LIBS_PATH
}
"
)
message
(
DEPRECATION
"Packaging system libraries is enabled. This will be removed in the future due to the native compiler support!"
)
else
()
# Activate static linkage of compiler runtime libs
if
(
MSVC
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/MT"
)
else
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-static"
)
endif
()
endif
()
endif
()
# Get Python and pipenv to build the Python packages
set
(
PYTHON_TARGETS
""
)
# List containing the python targets
...
...
@@ -76,8 +90,8 @@ set(PYBIND11_FINDPYTHON ON) # Let pybind11 find the python interpreter
add_subdirectory
(
extern/pybind11
)
# Set the output directory for all libraries -> Use generator expressions to force multi-generator output to the same location
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/unicadoRuntimeLibs$<0:>
)
# .dll for Windows
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/unicadoRuntimeLibs$<0:>
)
# .so for Unix
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/unicadoRuntimeLibs$<0:>
)
# .dll for Windows
and .so for Unix
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/unicadoRuntimeLibs$<0:>
)
#
.lib for Windows and
.so for Unix
# Include the library directories based on dependency order
add_subdirectory
(
aerodynamics
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment