mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
CMake: Build libraries with VERSION/SOVERSION
This takes advantage of SONAME and versioning on platforms that support it.
This commit is contained in:
parent
aed544bf5f
commit
2f6c79b9e6
@ -47,6 +47,7 @@ include(AddFlexTarget) # Defines add_flex_target function
|
||||
include(CompositeSources) # Defines composite_sources function
|
||||
include(Interrogate) # Defines target_interrogate AND add_python_module
|
||||
include(RunPzip) # Defines run_pzip function
|
||||
include(Versioning) # Hooks 'add_library' to apply VERSION/SOVERSION
|
||||
|
||||
# Add the include path for source and header files generated by CMake
|
||||
include_directories("${PROJECT_BINARY_DIR}/include")
|
||||
|
6
cmake/macros/Versioning.cmake
Normal file
6
cmake/macros/Versioning.cmake
Normal file
@ -0,0 +1,6 @@
|
||||
function(add_library target_name)
|
||||
_add_library("${target_name}" ${ARGN})
|
||||
set_target_properties("${target_name}" PROPERTIES
|
||||
VERSION "${PROJECT_VERSION}"
|
||||
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
|
||||
endfunction(add_library)
|
Loading…
x
Reference in New Issue
Block a user