Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on systems with new versions of protobuf library #7372

Merged
merged 4 commits into from
Jan 7, 2025
Merged
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
2 changes: 0 additions & 2 deletions 3rdparty/libprojectm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ set(BUILD_PROJECTM_STATIC ON)
set(DISABLE_NATIVE_PRESETS ON)
set(DISABLE_MILKDROP_PRESETS OFF)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

pkg_check_modules(GLEW glew)

if(DISABLE_NATIVE_PRESETS)
Expand Down
1 change: 0 additions & 1 deletion 3rdparty/qtsingleapplication/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")

set(SINGLEAPP-SOURCES
qtlocalpeer.cpp
Expand Down
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.13.0)
project(clementine)

cmake_policy(SET CMP0053 OLD)
Expand All @@ -15,6 +15,8 @@ include(cmake/Format.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")

set(CMAKE_CXX_STANDARD 17)

if (CMAKE_CXX_COMPILER MATCHES ".*clang")
set(CMAKE_COMPILER_IS_CLANGXX 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
Expand Down Expand Up @@ -45,7 +47,10 @@ endif(OPENGL_FOUND)
find_package(Boost REQUIRED)
find_package(Gettext REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(Protobuf REQUIRED)
find_package(protobuf)
if(NOT protobuf_FOUND)
find_package(Protobuf REQUIRED)
endif()
find_package(FFTW3)
find_package(ALSA)
if (NOT APPLE)
Expand Down
2 changes: 0 additions & 2 deletions ext/libclementine-common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ include_directories(${PROTOBUF_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")

set(SOURCES
core/closure.cpp
core/latch.cpp
Expand Down
10 changes: 4 additions & 6 deletions ext/libclementine-remote/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
include_directories(${PROTOBUF_INCLUDE_DIRS})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")

set(MESSAGES
remotecontrolmessages.proto
)

protobuf_generate_cpp(PROTO_SOURCES PROTO_HEADERS ${MESSAGES})

add_library(libclementine-remote STATIC
${PROTO_SOURCES}
${MESSAGES}
)

protobuf_generate(TARGET libclementine-remote LANGUAGE cpp)

target_link_libraries(libclementine-remote
${PROTOBUF_LIBRARY}
libclementine-common
protobuf::libprotobuf
)

10 changes: 4 additions & 6 deletions ext/libclementine-tagreader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-common)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")

set(MESSAGES
tagreadermessages.proto
)
Expand All @@ -28,16 +26,16 @@ optional_source(HAVE_GOOGLE_DRIVE

qt5_wrap_cpp(MOC ${HEADERS})

protobuf_generate_cpp(PROTO_SOURCES PROTO_HEADERS ${MESSAGES})

add_library(libclementine-tagreader STATIC
${PROTO_SOURCES}
${MESSAGES}
${SOURCES}
${MOC}
)

protobuf_generate(TARGET libclementine-tagreader LANGUAGE cpp)

target_link_libraries(libclementine-tagreader
${PROTOBUF_LIBRARY}
libclementine-common
protobuf::libprotobuf
)

2 changes: 1 addition & 1 deletion gst/moodbar/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.0)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall --std=c++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall")

include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

Expand Down