forked from blue/squawk
build: WIP CMakeLists refactoring
This commit is contained in:
parent
b7b70bc198
commit
6e06a1d5bc
21 changed files with 214 additions and 264 deletions
|
@ -1,43 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.3)
|
||||
project(squawkUI)
|
||||
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
# Instruct CMake to create code from Qt designer ui files
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
# Find the QtWidgets library
|
||||
find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets DBus Core)
|
||||
find_package(Boost 1.36.0 REQUIRED)
|
||||
if(Boost_FOUND)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
endif()
|
||||
target_sources(squawk PRIVATE squawk.cpp squawk.h squawk.ui)
|
||||
|
||||
add_subdirectory(models)
|
||||
add_subdirectory(utils)
|
||||
add_subdirectory(widgets)
|
||||
|
||||
set(squawkUI_SRC
|
||||
squawk.cpp
|
||||
models/accounts.cpp
|
||||
models/roster.cpp
|
||||
models/item.cpp
|
||||
models/account.cpp
|
||||
models/contact.cpp
|
||||
models/presence.cpp
|
||||
models/group.cpp
|
||||
models/room.cpp
|
||||
models/abstractparticipant.cpp
|
||||
models/participant.cpp
|
||||
models/reference.cpp
|
||||
models/messagefeed.cpp
|
||||
models/element.cpp
|
||||
)
|
||||
|
||||
# Tell CMake to create the helloworld executable
|
||||
add_library(squawkUI STATIC ${squawkUI_SRC})
|
||||
|
||||
# Use the Widgets module from Qt 5.
|
||||
target_link_libraries(squawkUI squawkWidgets)
|
||||
target_link_libraries(squawkUI squawkUIUtils)
|
||||
target_link_libraries(squawkUI Qt5::Widgets)
|
||||
target_link_libraries(squawkUI Qt5::DBus)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue