-
Notifications
You must be signed in to change notification settings - Fork 19
/
CMakeLists.txt
47 lines (39 loc) · 1.12 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
project(qt-event-dispatcher-libuv)
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
if(MSVC)
add_definitions(
-DNOMINMAX
-DWIN32_LEAN_AND_MEAN
)
endif()
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
)
set(PUBLIC
src/eventdispatcherlibuv.h
)
set(SOURCES
src/eventdispatcherlibuv_p.h
src/eventdispatcherlibuv.cpp
src/eventdispatcherlibuv/async_channel.cpp
src/eventdispatcherlibuv/timer_notifier.cpp
src/eventdispatcherlibuv/time_tracker.cpp
src/eventdispatcherlibuv/libuv_api.cpp
src/eventdispatcherlibuv/socket_notifier.cpp
)
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
if(NOT TARGET LibUV::LibUV)
find_package(LibUV REQUIRED)
endif()
find_package(Qt5 5.2.0 REQUIRED COMPONENTS Core Gui)
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
add_library(qt-event-dispatcher-libuv STATIC ${PUBLIC} ${SOURCES})
target_link_libraries(qt-event-dispatcher-libuv
LibUV::LibUV
Qt5::Core
Qt5::Gui
)
set_target_properties(qt-event-dispatcher-libuv PROPERTIES AUTOMOC TRUE)