mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Install libocsync to lib/ without subfolder.
Installing to lib/${APPLICATION_EXECUTABLE} has caused a bunch of
irritations in the past and subtle annoying to fix bugs. To avoid name
clashes with branded clients ${APPLICATION_EXECUTABLE} becomes now
part of the filename instead of the subfolder.
The concrete motivation to change this now is that on Windows there
is no RPATH and it's not possible to run owncloud directly from the
Craft Root folder, which is nice when you're developing on Windows.
It would have been possible to change this just for Windows but as
written earlier this has caused lots of issues and thus I think it's
a good idea to just stay consistent accross platforms when touching it.
This commit is contained in:
parent
464c1fbce0
commit
79ef892e71
@ -389,7 +389,8 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
File "${BUILD_PATH}\bin\${APPLICATION_EXECUTABLE}"
|
||||
File "${BUILD_PATH}\bin\${APPLICATION_CMD_EXECUTABLE}"
|
||||
File "${BUILD_PATH}\bin\lib${APPLICATION_SHORTNAME}sync.dll"
|
||||
File "${BUILD_PATH}\bin\libocsync.dll"
|
||||
; Yes, with @ ... ${APPLICATION_EXECUTABLE} contains the .exe extension, @APPLICATION_EXECUTABLE@ does not.
|
||||
File "${BUILD_PATH}\bin\libocsync_@APPLICATION_EXECUTABLE@.dll"
|
||||
|
||||
File "${BUILD_PATH}\src\gui\client*.qm"
|
||||
; Make sure only to copy qt, not qt_help, etc
|
||||
|
||||
@ -16,13 +16,11 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_LIBRARIES_ONLY)
|
||||
add_executable(${cmd_NAME} ${cmd_SRC})
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
||||
add_executable(${cmd_NAME} ${cmd_SRC})
|
||||
set_target_properties(${cmd_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
||||
|
||||
target_link_libraries(${cmd_NAME} ocsync ${synclib_NAME} Qt5::Core Qt5::Network)
|
||||
target_link_libraries(${cmd_NAME} ocsync_${APPLICATION_EXECUTABLE} ${synclib_NAME} Qt5::Core Qt5::Network)
|
||||
|
||||
# Need tokenizer for netrc parser
|
||||
target_include_directories(${cmd_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer)
|
||||
|
||||
@ -45,7 +45,6 @@ if(NOT BUILD_LIBRARIES_ONLY)
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTOMOC ON)
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTORCC ON)
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
||||
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}" )
|
||||
target_link_libraries(${CRASHREPORTER_EXECUTABLE}
|
||||
crashreporter-gui
|
||||
Qt5::Core Qt5::Widgets
|
||||
|
||||
@ -69,7 +69,7 @@ endif()
|
||||
|
||||
configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h)
|
||||
|
||||
set(CSYNC_LIBRARY ocsync)
|
||||
set(CSYNC_LIBRARY "ocsync_${APPLICATION_EXECUTABLE}")
|
||||
add_library(${CSYNC_LIBRARY} SHARED ${common_SOURCES} ${csync_SRCS})
|
||||
|
||||
target_include_directories(
|
||||
@ -135,11 +135,11 @@ else()
|
||||
TARGETS
|
||||
${CSYNC_LIBRARY}
|
||||
LIBRARY DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/${APPLICATION_EXECUTABLE}
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/${APPLICATION_EXECUTABLE}
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION
|
||||
${CMAKE_INSTALL_BINDIR}/${APPLICATION_EXECUTABLE}
|
||||
${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@ -274,9 +274,6 @@ target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
||||
)
|
||||
# Only relevant for Linux? On OS X it by default properly checks in the bundle directory next to the exe
|
||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
||||
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::Widgets Qt5::Network Qt5::Xml)
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
||||
|
||||
@ -90,7 +90,7 @@ ENDIF(NOT APPLE)
|
||||
|
||||
add_library(${synclib_NAME} SHARED ${libsync_SRCS})
|
||||
target_link_libraries(${synclib_NAME}
|
||||
ocsync
|
||||
ocsync_${APPLICATION_EXECUTABLE}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
Qt5::Core Qt5::Network
|
||||
)
|
||||
@ -122,8 +122,6 @@ set_target_properties( ${synclib_NAME} PROPERTIES
|
||||
SOVERSION ${MIRALL_SOVERSION}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
||||
)
|
||||
set_target_properties( ${synclib_NAME} PROPERTIES
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
||||
|
||||
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
install(TARGETS ${synclib_NAME}
|
||||
|
||||
@ -13,7 +13,7 @@ include_directories(${CHECK_INCLUDE_DIRS})
|
||||
add_library(${TORTURE_LIBRARY} STATIC torture.c cmdline.c)
|
||||
target_link_libraries(${TORTURE_LIBRARY} ${CMOCKA_LIBRARIES} ${CSYNC_LIBRARY})
|
||||
|
||||
set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core ocsync)
|
||||
set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core ocsync_${APPLICATION_EXECUTABLE})
|
||||
|
||||
# create tests
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user