1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2025-05-04 08:34:10 +02:00

Rename ocsync library to ${APPLICATION_EXECUTABLE}_csync

This commit is contained in:
Dominik Schmidt 2018-06-20 09:53:21 +02:00 committed by Kevin Ottens
parent aad928a6be
commit 07f331717f
No known key found for this signature in database
GPG Key ID: 074BBBCB8DECC9E2
6 changed files with 19 additions and 18 deletions

View File

@ -44,6 +44,9 @@ if(NOT CRASHREPORTER_EXECUTABLE)
set(CRASHREPORTER_EXECUTABLE "${APPLICATION_EXECUTABLE}_crash_reporter") set(CRASHREPORTER_EXECUTABLE "${APPLICATION_EXECUTABLE}_crash_reporter")
endif() endif()
set(synclib_NAME "${APPLICATION_EXECUTABLE}sync")
set(csync_NAME "${APPLICATION_EXECUTABLE}_csync")
include(Warnings) include(Warnings)
include(${CMAKE_SOURCE_DIR}/VERSION.cmake) include(${CMAKE_SOURCE_DIR}/VERSION.cmake)

View File

@ -389,8 +389,7 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}" File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}" File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}"
File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}sync.dll" File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}sync.dll"
; Yes, with @ ... ${APPLICATION_EXECUTABLE} contains the .exe extension, @APPLICATION_EXECUTABLE@ does not. File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}_csync.dll"
File "${BUILD_PATH}\bin\libocsync_@APPLICATION_EXECUTABLE@.dll"
File "${BUILD_PATH}\src\gui\client*.qm" File "${BUILD_PATH}\src\gui\client*.qm"
; Make sure only to copy qt, not qt_help, etc ; Make sure only to copy qt, not qt_help, etc

View File

@ -24,7 +24,7 @@ if(NOT BUILD_LIBRARIES_ONLY)
set_target_properties(${cmd_NAME} PROPERTIES set_target_properties(${cmd_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} ) RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
target_link_libraries(${cmd_NAME} ocsync_${APPLICATION_EXECUTABLE} ${synclib_NAME} Qt5::Core Qt5::Network) target_link_libraries(${cmd_NAME} "${csync_NAME}" "${synclib_NAME}" Qt5::Core Qt5::Network)
# Need tokenizer for netrc parser # Need tokenizer for netrc parser
target_include_directories(${cmd_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer) target_include_directories(${cmd_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer)

View File

@ -69,36 +69,35 @@ endif()
configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h) configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h)
set(CSYNC_LIBRARY "ocsync_${APPLICATION_EXECUTABLE}") add_library("${csync_NAME}" SHARED ${common_SOURCES} ${csync_SRCS})
add_library(${CSYNC_LIBRARY} SHARED ${common_SOURCES} ${csync_SRCS})
target_include_directories( target_include_directories(
${CSYNC_LIBRARY} "${csync_NAME}"
PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std
) )
find_package(SQLite3 3.8.0 REQUIRED) find_package(SQLite3 3.8.0 REQUIRED)
if (USE_OUR_OWN_SQLITE3) if (USE_OUR_OWN_SQLITE3)
# make sure that the path for the local sqlite3 is before the system one # make sure that the path for the local sqlite3 is before the system one
target_include_directories(${CSYNC_LIBRARY} BEFORE PRIVATE ${SQLITE3_INCLUDE_DIR}) target_include_directories("${csync_NAME}" BEFORE PRIVATE ${SQLITE3_INCLUDE_DIR})
else() else()
target_include_directories(${CSYNC_LIBRARY} PRIVATE ${SQLITE3_INCLUDE_DIR}) target_include_directories("${csync_NAME}" PRIVATE ${SQLITE3_INCLUDE_DIR})
endif() endif()
generate_export_header(${CSYNC_LIBRARY} generate_export_header("${csync_NAME}"
EXPORT_MACRO_NAME OCSYNC_EXPORT EXPORT_MACRO_NAME OCSYNC_EXPORT
EXPORT_FILE_NAME ocsynclib.h EXPORT_FILE_NAME ocsynclib.h
) )
target_link_libraries(${CSYNC_LIBRARY} target_link_libraries("${csync_NAME}"
${CSYNC_REQUIRED_LIBRARIES} ${CSYNC_REQUIRED_LIBRARIES}
${SQLITE3_LIBRARIES} ${SQLITE3_LIBRARIES}
Qt5::Core Qt5::Concurrent Qt5::Core Qt5::Concurrent
) )
if(ZLIB_FOUND) if(ZLIB_FOUND)
target_link_libraries(${CSYNC_LIBRARY} ZLIB::ZLIB) target_link_libraries("${csync_NAME}" ZLIB::ZLIB)
endif(ZLIB_FOUND) endif(ZLIB_FOUND)
@ -106,11 +105,11 @@ endif(ZLIB_FOUND)
if (APPLE) if (APPLE)
find_library(FOUNDATION_LIBRARY NAMES Foundation) find_library(FOUNDATION_LIBRARY NAMES Foundation)
find_library(CORESERVICES_LIBRARY NAMES CoreServices) find_library(CORESERVICES_LIBRARY NAMES CoreServices)
target_link_libraries(${CSYNC_LIBRARY} ${FOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY}) target_link_libraries("${csync_NAME}" ${FOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})
endif() endif()
set_target_properties( set_target_properties(
${CSYNC_LIBRARY} "${csync_NAME}"
PROPERTIES PROPERTIES
VERSION VERSION
${LIBRARY_VERSION} ${LIBRARY_VERSION}
@ -122,7 +121,7 @@ set_target_properties(
if(BUILD_OWNCLOUD_OSX_BUNDLE) if(BUILD_OWNCLOUD_OSX_BUNDLE)
INSTALL( INSTALL(
TARGETS TARGETS
${CSYNC_LIBRARY} "${csync_NAME}"
LIBRARY DESTINATION LIBRARY DESTINATION
${LIB_INSTALL_DIR} ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ARCHIVE DESTINATION
@ -133,7 +132,7 @@ if(BUILD_OWNCLOUD_OSX_BUNDLE)
else() else()
INSTALL( INSTALL(
TARGETS TARGETS
${CSYNC_LIBRARY} "${csync_NAME}"
LIBRARY DESTINATION LIBRARY DESTINATION
${CMAKE_INSTALL_LIBDIR} ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ARCHIVE DESTINATION

View File

@ -94,7 +94,7 @@ ENDIF(NOT APPLE)
add_library(${synclib_NAME} SHARED ${libsync_SRCS}) add_library(${synclib_NAME} SHARED ${libsync_SRCS})
target_link_libraries(${synclib_NAME} target_link_libraries(${synclib_NAME}
ocsync_${APPLICATION_EXECUTABLE} "${csync_NAME}"
OpenSSL::Crypto OpenSSL::Crypto
OpenSSL::SSL OpenSSL::SSL
${OS_SPECIFIC_LINK_LIBRARIES} ${OS_SPECIFIC_LINK_LIBRARIES}

View File

@ -11,9 +11,9 @@ include_directories(
include_directories(${CHECK_INCLUDE_DIRS}) include_directories(${CHECK_INCLUDE_DIRS})
# create test library # create test library
add_library(${TORTURE_LIBRARY} STATIC torture.c cmdline.c) add_library(${TORTURE_LIBRARY} STATIC torture.c cmdline.c)
target_link_libraries(${TORTURE_LIBRARY} ${CMOCKA_LIBRARIES} ${CSYNC_LIBRARY}) target_link_libraries(${TORTURE_LIBRARY} ${CMOCKA_LIBRARIES})
set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core ocsync_${APPLICATION_EXECUTABLE}) set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core "${csync_NAME}")
# create tests # create tests