mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-12 17:59:00 +08:00
Set VERSION and SOVERSION for all targets as appropriate (#676)
Set VERSION property for non-static library targets and executable targets, and set SOVERSION for non-MSVC targets.
This commit is contained in:
parent
8f9ebcdb9f
commit
3ea441ec1c
@ -889,9 +889,6 @@ else()
|
||||
# For Mac, we need to build a .bundle for the unity plugin.
|
||||
if(APPLE)
|
||||
set_target_properties(dracodec_unity PROPERTIES BUNDLE true)
|
||||
elseif(NOT unity_decoder_lib_type STREQUAL STATIC)
|
||||
set_target_properties(dracodec_unity
|
||||
PROPERTIES SOVERSION ${DRACO_SOVERSION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -916,9 +913,6 @@ else()
|
||||
# For Mac, we need to build a .bundle for the plugin.
|
||||
if(APPLE)
|
||||
set_target_properties(draco_maya_wrapper PROPERTIES BUNDLE true)
|
||||
else()
|
||||
set_target_properties(draco_maya_wrapper
|
||||
PROPERTIES SOVERSION ${DRACO_SOVERSION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -87,6 +87,7 @@ macro(draco_add_executable)
|
||||
endif()
|
||||
|
||||
add_executable(${exe_NAME} ${exe_SOURCES})
|
||||
set_target_properties(${exe_NAME} PROPERTIES VERSION ${DRACO_VERSION})
|
||||
|
||||
if(exe_OUTPUT_NAME)
|
||||
set_target_properties(${exe_NAME} PROPERTIES OUTPUT_NAME ${exe_OUTPUT_NAME})
|
||||
@ -318,8 +319,12 @@ macro(draco_add_library)
|
||||
set_target_properties(${lib_NAME} PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
if(lib_TYPE STREQUAL SHARED AND NOT MSVC)
|
||||
set_target_properties(${lib_NAME} PROPERTIES SOVERSION ${DRACO_SOVERSION})
|
||||
# VERSION and SOVERSION as necessary
|
||||
if(NOT lib_TYPE STREQUAL STATIC)
|
||||
set_target_properties(${lib_NAME} PROPERTIES VERSION ${DRACO_VERSION})
|
||||
if(NOT MSVC)
|
||||
set_target_properties(${lib_NAME} PROPERTIES SOVERSION ${DRACO_SOVERSION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS AND (MSVC OR WIN32))
|
||||
|
Loading…
x
Reference in New Issue
Block a user