|
|
@@ -69,36 +69,35 @@ endif()
|
|
|
|
|
|
configure_file(csync_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/csync_version.h)
|
|
|
|
|
|
-set(CSYNC_LIBRARY "ocsync_${APPLICATION_EXECUTABLE}")
|
|
|
-add_library(${CSYNC_LIBRARY} SHARED ${common_SOURCES} ${csync_SRCS})
|
|
|
+add_library("${csync_NAME}" SHARED ${common_SOURCES} ${csync_SRCS})
|
|
|
|
|
|
target_include_directories(
|
|
|
- ${CSYNC_LIBRARY}
|
|
|
+ "${csync_NAME}"
|
|
|
PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/std
|
|
|
)
|
|
|
|
|
|
find_package(SQLite3 3.8.0 REQUIRED)
|
|
|
if (USE_OUR_OWN_SQLITE3)
|
|
|
# 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()
|
|
|
- target_include_directories(${CSYNC_LIBRARY} PRIVATE ${SQLITE3_INCLUDE_DIR})
|
|
|
+ target_include_directories("${csync_NAME}" PRIVATE ${SQLITE3_INCLUDE_DIR})
|
|
|
endif()
|
|
|
|
|
|
|
|
|
-generate_export_header(${CSYNC_LIBRARY}
|
|
|
+generate_export_header("${csync_NAME}"
|
|
|
EXPORT_MACRO_NAME OCSYNC_EXPORT
|
|
|
EXPORT_FILE_NAME ocsynclib.h
|
|
|
)
|
|
|
|
|
|
-target_link_libraries(${CSYNC_LIBRARY}
|
|
|
+target_link_libraries("${csync_NAME}"
|
|
|
${CSYNC_REQUIRED_LIBRARIES}
|
|
|
${SQLITE3_LIBRARIES}
|
|
|
Qt5::Core Qt5::Concurrent
|
|
|
)
|
|
|
|
|
|
if(ZLIB_FOUND)
|
|
|
- target_link_libraries(${CSYNC_LIBRARY} ZLIB::ZLIB)
|
|
|
+ target_link_libraries("${csync_NAME}" ZLIB::ZLIB)
|
|
|
endif(ZLIB_FOUND)
|
|
|
|
|
|
|
|
|
@@ -106,11 +105,11 @@ endif(ZLIB_FOUND)
|
|
|
if (APPLE)
|
|
|
find_library(FOUNDATION_LIBRARY NAMES Foundation)
|
|
|
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()
|
|
|
|
|
|
set_target_properties(
|
|
|
- ${CSYNC_LIBRARY}
|
|
|
+ "${csync_NAME}"
|
|
|
PROPERTIES
|
|
|
VERSION
|
|
|
${LIBRARY_VERSION}
|
|
|
@@ -122,7 +121,7 @@ set_target_properties(
|
|
|
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
|
|
INSTALL(
|
|
|
TARGETS
|
|
|
- ${CSYNC_LIBRARY}
|
|
|
+ "${csync_NAME}"
|
|
|
LIBRARY DESTINATION
|
|
|
${LIB_INSTALL_DIR}
|
|
|
ARCHIVE DESTINATION
|
|
|
@@ -133,7 +132,7 @@ if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
|
|
else()
|
|
|
INSTALL(
|
|
|
TARGETS
|
|
|
- ${CSYNC_LIBRARY}
|
|
|
+ "${csync_NAME}"
|
|
|
LIBRARY DESTINATION
|
|
|
${CMAKE_INSTALL_LIBDIR}
|
|
|
ARCHIVE DESTINATION
|