ensure DLL are generated with branded names

cmake distinct runtime and library

on unix dynamic shared libraries are library kind of objects
on windows they are runtime kind of objects

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2021-10-05 11:29:49 +02:00 committed by Matthieu Gallien (Rebase PR Action)
parent f7a34b8bdc
commit c751fd5672
5 changed files with 59 additions and 34 deletions

View file

@ -109,7 +109,9 @@ set_target_properties(
RUNTIME_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
LIBRARY_OUTPUT_NAME
"${APPLICATION_EXECUTABLE}_csync"
${APPLICATION_EXECUTABLE}_csync
RUNTIME_OUTPUT_NAME
${APPLICATION_EXECUTABLE}_csync
)
if(BUILD_OWNCLOUD_OSX_BUNDLE)
INSTALL(

View file

@ -104,7 +104,7 @@ ENDIF(NOT APPLE)
find_package(Qt5 REQUIRED COMPONENTS WebSockets)
add_library(nextcloudsync SHARED ${libsync_SRCS})
set_target_properties(nextcloudsync PROPERTIES LIBRARY_OUTPUT_NAME ${APPLICATION_EXECUTABLE}sync)
target_link_libraries(nextcloudsync
PUBLIC
nextcloud_csync
@ -135,11 +135,19 @@ GENERATE_EXPORT_HEADER( nextcloudsync
target_include_directories(nextcloudsync PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties( nextcloudsync PROPERTIES
VERSION ${MIRALL_VERSION}
SOVERSION ${MIRALL_SOVERSION}
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
set_target_properties(
nextcloudsync
PROPERTIES
VERSION
${MIRALL_VERSION}
SOVERSION
${MIRALL_SOVERSION}
RUNTIME_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
LIBRARY_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync
RUNTIME_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync
)
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)

View file

@ -6,21 +6,26 @@ if (WIN32)
hydrationjob.cpp
vfs_cfapi.cpp
)
set_target_properties(nextcloudsync_vfs_cfapi
PROPERTIES
LIBRARY_OUTPUT_NAME ${APPLICATION_EXECUTABLE}sync_vfs_cfapi
)
target_link_libraries(nextcloudsync_vfs_cfapi PRIVATE
nextcloudsync
cldapi
)
set_target_properties("nextcloudsync_vfs_cfapi" PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
PREFIX ""
AUTOMOC TRUE
set_target_properties(nextcloudsync_vfs_cfapi
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
PREFIX
""
AUTOMOC
TRUE
LIBRARY_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_cfapi
RUNTIME_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_cfapi
)
target_include_directories("nextcloudsync_vfs_cfapi" BEFORE PUBLIC ${CMAKE_CURRENT_BINARY_DIR} INTERFACE ${CMAKE_BINARY_DIR})

View file

@ -1,18 +1,23 @@
add_library(nextcloudsync_vfs_suffix SHARED
vfs_suffix.cpp
)
set_target_properties(nextcloudsync_vfs_suffix
PROPERTIES
LIBRARY_OUTPUT_NAME ${APPLICATION_EXECUTABLE}sync_vfs_suffix
)
target_link_libraries(nextcloudsync_vfs_suffix PRIVATE nextcloudsync)
set_target_properties(nextcloudsync_vfs_suffix PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
PREFIX ""
AUTOMOC TRUE
set_target_properties(nextcloudsync_vfs_suffix
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
PREFIX
""
AUTOMOC
TRUE
LIBRARY_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_suffix
RUNTIME_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_suffix
)
if(APPLE)

View file

@ -7,18 +7,23 @@ if (LINUX)
add_library(nextcloudsync_vfs_xattr SHARED
${vfs_xattr_SRCS}
)
set_target_properties(nextcloudsync_vfs_xattr
PROPERTIES
LIBRARY_OUTPUT_NAME ${APPLICATION_EXECUTABLE}sync_vfs_xattr
)
target_link_libraries(nextcloudsync_vfs_xattr PRIVATE nextcloudsync)
set_target_properties(nextcloudsync_vfs_xattr PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
PREFIX ""
AUTOMOC TRUE
set_target_properties(nextcloudsync_vfs_xattr
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_DIRECTORY
${BIN_OUTPUT_DIRECTORY}
PREFIX
""
AUTOMOC
TRUE
LIBRARY_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_xattr
RUNTIME_OUTPUT_NAME
${APPLICATION_EXECUTABLE}sync_vfs_xattr
)
target_include_directories(nextcloudsync_vfs_xattr BEFORE PUBLIC ${CMAKE_CURRENT_BINARY_DIR} INTERFACE ${CMAKE_CURRENT_BINARY_DIR})