Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Schmidt <dev@dominik-schmidt.de>2018-06-14 22:49:07 +0300
committerDominik Schmidt <domme@tomahawk-player.org>2018-06-20 12:23:16 +0300
commit79ef892e7191cde5ffd7bc4e03b2718887bb879a (patch)
tree4ff73d5d48d27169bfd5f80a15d2e4351a360ab5
parent464c1fbce079f39f4c418d3b8b4664836d52b2d1 (diff)
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.
-rw-r--r--cmake/modules/NSIS.template.in3
-rw-r--r--src/cmd/CMakeLists.txt10
-rw-r--r--src/crashreporter/CMakeLists.txt1
-rw-r--r--src/csync/CMakeLists.txt8
-rw-r--r--src/gui/CMakeLists.txt3
-rw-r--r--src/libsync/CMakeLists.txt4
-rw-r--r--test/csync/CMakeLists.txt2
7 files changed, 12 insertions, 19 deletions
diff --git a/cmake/modules/NSIS.template.in b/cmake/modules/NSIS.template.in
index 8fff6e196..dc68d745b 100644
--- a/cmake/modules/NSIS.template.in
+++ b/cmake/modules/NSIS.template.in
@@ -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
diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt
index 449313668..da4f805b5 100644
--- a/src/cmd/CMakeLists.txt
+++ b/src/cmd/CMakeLists.txt
@@ -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)
diff --git a/src/crashreporter/CMakeLists.txt b/src/crashreporter/CMakeLists.txt
index 40b37e95a..072e1fb6c 100644
--- a/src/crashreporter/CMakeLists.txt
+++ b/src/crashreporter/CMakeLists.txt
@@ -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
diff --git a/src/csync/CMakeLists.txt b/src/csync/CMakeLists.txt
index 26d66e655..a2ed3e2f3 100644
--- a/src/csync/CMakeLists.txt
+++ b/src/csync/CMakeLists.txt
@@ -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()
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index bb60fcff1..2a47d932d 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -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} )
diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt
index 33e379616..a4f4f7d0d 100644
--- a/src/libsync/CMakeLists.txt
+++ b/src/libsync/CMakeLists.txt
@@ -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}
diff --git a/test/csync/CMakeLists.txt b/test/csync/CMakeLists.txt
index a7ec9f133..d75361b02 100644
--- a/test/csync/CMakeLists.txt
+++ b/test/csync/CMakeLists.txt
@@ -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