mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-15 18:19:33 +01:00
814bb3006c
This is a non-standard header, so it should be checked properly. This fixes compilation with musl libc and possibly other C library implementations.
58 lines
1.4 KiB
CMake
58 lines
1.4 KiB
CMake
if (Backtrace_FOUND)
|
|
include_directories(${Backtrace_INCLUDE_DIRS})
|
|
endif (Backtrace_FOUND)
|
|
|
|
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
include_directories(${CMAKE_SOURCE_DIR}/src)
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/backtrace_inc.h.in ${CMAKE_CURRENT_BINARY_DIR}/backtrace_inc.h)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -U__STRICT_ANSI__ -Wall -Wextra -Wpedantic -Woverloaded-virtual -fpermissive")
|
|
|
|
if(APPLE)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter")
|
|
endif()
|
|
|
|
set(SOURCES
|
|
core/closure.cpp
|
|
core/logging.cpp
|
|
core/messagehandler.cpp
|
|
core/messagereply.cpp
|
|
core/waitforsignal.cpp
|
|
core/workerpool.cpp
|
|
)
|
|
|
|
set(HEADERS
|
|
core/closure.h
|
|
core/messagehandler.h
|
|
core/messagereply.h
|
|
core/workerpool.h
|
|
)
|
|
|
|
if(APPLE)
|
|
list(APPEND SOURCES core/scoped_nsautorelease_pool.mm)
|
|
endif(APPLE)
|
|
|
|
qt5_wrap_cpp(MOC ${HEADERS})
|
|
|
|
add_library(libstrawberry-common STATIC
|
|
${SOURCES}
|
|
${MOC}
|
|
)
|
|
|
|
if (Backtrace_FOUND)
|
|
target_link_libraries(libstrawberry-common ${Backtrace_LIBRARIES})
|
|
endif (Backtrace_FOUND)
|
|
|
|
target_link_libraries(libstrawberry-common
|
|
#${PROTOBUF_LIBRARY}
|
|
${TAGLIB_LIBRARIES}
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
)
|
|
|
|
target_link_libraries(libstrawberry-common Qt5::Core Qt5::Network)
|