strawberry-audio-player-win.../ext/libstrawberry-common/CMakeLists.txt

61 lines
1.2 KiB
CMake
Raw Normal View History

2020-04-23 20:59:09 +02:00
cmake_minimum_required(VERSION 3.0)
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)
2020-07-18 04:47:54 +02:00
if(WITH_QT6)
qt6_wrap_cpp(MOC ${HEADERS})
else()
qt5_wrap_cpp(MOC ${HEADERS})
endif()
2018-02-27 18:06:05 +01:00
2020-06-17 22:56:20 +02:00
link_directories(
${GLIB_LIBRARY_DIRS}
2020-07-18 04:47:54 +02:00
${QtCore_LIBRARY_DIRS}
${QtNetwork_LIBRARY_DIRS}
2020-06-17 22:56:20 +02:00
)
2020-04-23 20:59:09 +02:00
add_library(libstrawberry-common STATIC ${SOURCES} ${MOC})
2018-02-27 18:06:05 +01:00
target_include_directories(libstrawberry-common SYSTEM PRIVATE
${GLIB_INCLUDE_DIRS}
2020-07-18 04:47:54 +02:00
${QtCore_INCLUDE_DIRS}
${QtNetwork_INCLUDE_DIRS}
)
2020-06-17 22:56:20 +02:00
target_include_directories(libstrawberry-common PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src
)
target_link_libraries(libstrawberry-common PRIVATE
${CMAKE_THREAD_LIBS_INIT}
${GLIB_LIBRARIES}
2020-07-18 04:47:54 +02:00
${QtCore_LIBRARIES}
${QtNetwork_LIBRARIES}
2020-06-17 22:56:20 +02:00
)
2020-04-23 20:59:09 +02:00
if(Backtrace_FOUND)
2020-06-17 22:56:20 +02:00
target_include_directories(libstrawberry-common PRIVATE ${Backtrace_INCLUDE_DIRS})
target_link_libraries(libstrawberry-common PRIVATE ${Backtrace_LIBRARIES})
2020-04-23 20:59:09 +02:00
endif(Backtrace_FOUND)