2020-02-06 20:04:23 +01:00
|
|
|
if (Backtrace_FOUND)
|
|
|
|
include_directories(${Backtrace_INCLUDE_DIRS})
|
|
|
|
endif (Backtrace_FOUND)
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src)
|
|
|
|
|
2020-02-06 20:04:23 +01:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/backtrace_inc.h.in ${CMAKE_CURRENT_BINARY_DIR}/backtrace_inc.h)
|
|
|
|
|
2019-04-05 23:09:00 +02:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
2019-11-15 00:22:41 +01:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -U__STRICT_ANSI__ -Wall -Wextra -Wpedantic -Woverloaded-virtual -fpermissive")
|
2018-02-27 18:06:05 +01:00
|
|
|
|
2019-11-15 00:22:41 +01:00
|
|
|
if(APPLE)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter")
|
2019-09-15 20:27:32 +02:00
|
|
|
endif()
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
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}
|
|
|
|
)
|
|
|
|
|
2020-02-06 20:04:23 +01:00
|
|
|
if (Backtrace_FOUND)
|
|
|
|
target_link_libraries(libstrawberry-common ${Backtrace_LIBRARIES})
|
|
|
|
endif (Backtrace_FOUND)
|
|
|
|
|
2018-02-27 18:06:05 +01:00
|
|
|
target_link_libraries(libstrawberry-common
|
|
|
|
#${PROTOBUF_LIBRARY}
|
|
|
|
${TAGLIB_LIBRARIES}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
)
|
|
|
|
|
2018-05-12 20:30:16 +02:00
|
|
|
target_link_libraries(libstrawberry-common Qt5::Core Qt5::Network)
|