mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-12 16:46:53 +01:00
564211aceb
Fixes #1008
44 lines
967 B
CMake
44 lines
967 B
CMake
cmake_minimum_required(VERSION 3.7)
|
|
|
|
set(SOURCES
|
|
core/logging.cpp
|
|
core/messagehandler.cpp
|
|
core/messagereply.cpp
|
|
core/workerpool.cpp
|
|
)
|
|
|
|
set(HEADERS
|
|
core/logging.h
|
|
core/messagehandler.h
|
|
core/messagereply.h
|
|
core/workerpool.h
|
|
)
|
|
|
|
qt_wrap_cpp(MOC ${HEADERS})
|
|
|
|
link_directories(${GLIB_LIBRARY_DIRS})
|
|
|
|
add_library(libstrawberry-common STATIC ${SOURCES} ${MOC})
|
|
|
|
target_include_directories(libstrawberry-common SYSTEM PRIVATE ${GLIB_INCLUDE_DIRS})
|
|
target_include_directories(libstrawberry-common PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_SOURCE_DIR}
|
|
${CMAKE_BINARY_DIR}/src
|
|
)
|
|
|
|
if(Backtrace_FOUND)
|
|
target_include_directories(libstrawberry-common SYSTEM PRIVATE ${Backtrace_INCLUDE_DIRS})
|
|
endif()
|
|
|
|
target_link_libraries(libstrawberry-common PRIVATE
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
${GLIB_LIBRARIES}
|
|
${QtCore_LIBRARIES}
|
|
${QtNetwork_LIBRARIES}
|
|
)
|
|
|
|
if(Backtrace_FOUND)
|
|
target_link_libraries(libstrawberry-common PRIVATE ${Backtrace_LIBRARIES})
|
|
endif()
|