Skip to content
Snippets Groups Projects
Verified Commit 2e2249c7 authored by Tobias Triffterer's avatar Tobias Triffterer :house_with_garden:
Browse files

Compilation Options for Development Certificate

Updated CMakeLists.txt to add a boolean option to enable the use of the
development certificate.

If enabled, the resource file of the certificate is added to the sources
of libfp311online and a compiler definition is set.
parent c992072f
No related branches found
No related tags found
No related merge requests found
Pipeline #3153 passed with stage
in 23 seconds
...@@ -67,6 +67,7 @@ set(libfp311online_SRCS ...@@ -67,6 +67,7 @@ set(libfp311online_SRCS
src/command.cpp src/command.cpp
src/experimentstate.cpp src/experimentstate.cpp
src/rootcanvaswidget.cpp src/rootcanvaswidget.cpp
src/cacertificates.cpp
"${CMAKE_CURRENT_BINARY_DIR}/version.libfp311online.cpp" "${CMAKE_CURRENT_BINARY_DIR}/version.libfp311online.cpp"
) )
...@@ -77,8 +78,16 @@ else() ...@@ -77,8 +78,16 @@ else()
include(${PROJECT_SOURCE_DIR}/cmake/build-root-submodule.cmake) include(${PROJECT_SOURCE_DIR}/cmake/build-root-submodule.cmake)
endif (${USE_HOST_ROOT_INSTALL}) endif (${USE_HOST_ROOT_INSTALL})
option(ENABLE_DEVEL_CERTIFICATES "Configure the application to use and trust the development certificate for the encryption of the connection between server and client. DO NOT ENABLE IN PRODUCTION!" ON) # Enable by default during development
if (${ENABLE_DEVEL_CERTIFICATES})
set(DEVEL_CERT_RESOURCE_FILE crypto/devel_cert.qrc)
else()
set(DEVEL_CERT_RESOURCE_FILE "")
endif (${ENABLE_DEVEL_CERTIFICATES})
add_library(fp311online STATIC add_library(fp311online STATIC
${libfp311online_SRCS} ${libfp311online_SRCS}
${DEVEL_CERT_RESOURCE_FILE}
) )
include(GenerateExportHeader) include(GenerateExportHeader)
...@@ -99,6 +108,10 @@ set_property(TARGET fp311online PROPERTY POSITION_INDEPENDENT_CODE ON) ...@@ -99,6 +108,10 @@ set_property(TARGET fp311online PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET fp311online PROPERTY CXX_VISIBILITY_PRESET hidden) set_property(TARGET fp311online PROPERTY CXX_VISIBILITY_PRESET hidden)
set_property(TARGET fp311online PROPERTY VISIBILITY_INLINES_HIDDEN ON) set_property(TARGET fp311online PROPERTY VISIBILITY_INLINES_HIDDEN ON)
if (${ENABLE_DEVEL_CERTIFICATES})
target_compile_definitions(fp311online PRIVATE LIBFP311ONLINE_LOAD_DEVEL_CERT_RESOURCE)
endif (${ENABLE_DEVEL_CERTIFICATES})
if ("${ROOT_MAJOR_VERSION}.${ROOT_MINOR_VERSION}" VERSION_GREATER_EQUAL 6.24) if ("${ROOT_MAJOR_VERSION}.${ROOT_MINOR_VERSION}" VERSION_GREATER_EQUAL 6.24)
# The interface of RooDataHist was improved in ROOT 6.24 and the old way of # The interface of RooDataHist was improved in ROOT 6.24 and the old way of
# querying the content of a bin was deprecated. # querying the content of a bin was deprecated.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment