Fix CMake build from source tarball

Set maximum tested version to C++17
Detect companion libraries from CMakeLists.txt not .git
This commit is contained in:
Gioacchino Mazzurco 2022-03-28 12:01:55 +02:00
parent 574e67e7d5
commit 6be9bb579b
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -73,6 +73,8 @@ list(
add_executable(${PROJECT_NAME} ${RS_SERVICE_SOURCES}) add_executable(${PROJECT_NAME} ${RS_SERVICE_SOURCES})
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR}) install(TARGETS ${PROJECT_NAME} DESTINATION ${RS_BIN_INSTALL_DIR})
################################################################################ ################################################################################
@ -84,10 +86,10 @@ endif(RS_DEVELOPMENT_BUILD)
################################################################################ ################################################################################
set(LIBRETROSHARE_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libretroshare/") set(LIBRETROSHARE_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libretroshare/")
if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/.git" ) if(EXISTS "${LIBRETROSHARE_DEVEL_DIR}/CMakeLists.txt" )
message( message(
STATUS STATUS
"libretroshare submodule found at ${LIBRETROSHARE_DEVEL_DIR} using it" ) "libretroshare source found at ${LIBRETROSHARE_DEVEL_DIR} using it" )
add_subdirectory( add_subdirectory(
"${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libretroshare" ) "${LIBRETROSHARE_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/libretroshare" )
else() else()
@ -138,10 +140,10 @@ endif(RS_SERVICE_TERMINAL_LOGIN)
if(RS_WEBUI) if(RS_WEBUI)
set(RS_WEBUI_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../webui/") set(RS_WEBUI_DEVEL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../webui/")
if(EXISTS "${RS_WEBUI_DEVEL_DIR}/.git" ) if(EXISTS "${RS_WEBUI_DEVEL_DIR}/CMakeLists.txt" )
message( message(
STATUS STATUS
"RetroShare WebUI repository found at ${RS_WEBUI_DEVEL_DIR} using it" ) "RetroShare WebUI source found at ${RS_WEBUI_DEVEL_DIR} using it" )
add_subdirectory( add_subdirectory(
"${RS_WEBUI_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/webui" ) "${RS_WEBUI_DEVEL_DIR}" "${CMAKE_BINARY_DIR}/webui" )
else() else()