mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-30 08:20:27 +03:00
b26db062d2
- Put all tests in the bin directory so that DLLs can be loaded - Add missing exports - Skip tests that use code depending on zlib - The "GMT" timezone is named differently, use the int constructor instead 5 tests are still failing, it's not really worth fixing at the moment since no developper is currently using Windows as its main platform.
55 lines
1.1 KiB
CMake
55 lines
1.1 KiB
CMake
|
|
|
|
# global needed variables
|
|
set(APPLICATION_NAME "ocsync")
|
|
|
|
set(LIBRARY_VERSION ${MIRALL_VERSION})
|
|
set(LIBRARY_SOVERSION "0")
|
|
|
|
# add definitions
|
|
include(DefineCMakeDefaults)
|
|
include(DefinePlatformDefaults)
|
|
include(DefineCompilerFlags)
|
|
include(DefineOptions.cmake)
|
|
|
|
include(DefineInstallationPaths)
|
|
|
|
# add macros
|
|
include(MacroAddPlugin)
|
|
include(MacroCopyFile)
|
|
|
|
if (NOT WIN32)
|
|
find_package(Iconv)
|
|
endif (NOT WIN32)
|
|
|
|
find_package(SQLite3 3.8.0 REQUIRED)
|
|
|
|
include(ConfigureChecks.cmake)
|
|
|
|
|
|
set(SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
macro_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake)
|
|
|
|
if (MEM_NULL_TESTS)
|
|
add_definitions(-DCSYNC_MEM_NULL_TESTS)
|
|
endif (MEM_NULL_TESTS)
|
|
|
|
add_subdirectory(src)
|
|
|
|
if (UNIT_TESTING)
|
|
set(WITH_TESTING ON)
|
|
|
|
find_package(CMocka)
|
|
if (CMOCKA_FOUND)
|
|
include(AddCMockaTest)
|
|
add_subdirectory(tests)
|
|
endif (CMOCKA_FOUND)
|
|
endif (UNIT_TESTING)
|
|
|
|
configure_file(config_csync.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_csync.h)
|
|
configure_file(config_test.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_test.h)
|
|
|
|
|