Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ add_subdirectory(csync)
add_subdirectory(libsync)
if (NOT BUILD_LIBRARIES_ONLY)
add_subdirectory(cmd)
add_subdirectory(e2ee_decrypt)
if (BUILD_GUI)
add_subdirectory(gui)
endif()
Expand Down
39 changes: 39 additions & 0 deletions src/e2ee_decrypt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: GPL-2.0-or-later

project(e2ee_decrypt)
set(CMAKE_AUTOMOC TRUE)

if(UNIX AND NOT APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
endif()

add_executable(nextcloud-e2ee-decrypt
main.cpp
e2eedecryptor.cpp
)

ecm_mark_nongui_executable(nextcloud-e2ee-decrypt)

target_compile_features(nextcloud-e2ee-decrypt PRIVATE cxx_std_20)
target_compile_definitions(nextcloud-e2ee-decrypt PRIVATE OPENSSL_SUPPRESS_DEPRECATED)

target_link_libraries(nextcloud-e2ee-decrypt
PRIVATE
Nextcloud::sync
Qt::Core
Qt::Network
OpenSSL::Crypto
)

set_target_properties(nextcloud-e2ee-decrypt PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
)

install(TARGETS nextcloud-e2ee-decrypt
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
Loading