forked from pavlonion/qtcurl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (40 loc) · 1.07 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
48
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH /usr/share/apps/cmake/modules/)
set(CMAKE_USE_SYSTEM_CURL ON)
find_package(Qt4 REQUIRED)
find_package(CURL REQUIRED)
find_package(QJSON REQUIRED)
# add some useful macros and variables
# (QT_USE_FILE is a variable defined by FIND_PACKAGE( Qt4 ) that contains a
# path to CMake script)
include(${QT_USE_FILE})
include_directories(
${QT_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
"./"
)
IF (NOT DEFINED QTCURL_DEBUG)
SET(QTCURL_DEBUG "off")
ENDIF()
IF (QTCURL_DEBUG STREQUAL "on")
ADD_DEFINITIONS(-DQTCURL_DEBUG)
ELSEIF (QTCURL_DEBUG STREQUAL "off")
REMOVE_DEFINITIONS(-DQTCURL_DEBUG)
ELSE()
message(WARNING
"QTCURL_DEBUG=${QTCURL_DEBUG} is wrong value. Expected \"on\" or \"off\"."
)
SET(QTCURL_DEBUG "off")
REMOVE_DEFINITIONS(-DQTCURL_DEBUG)
ENDIF()
message(QTCURL_DEBUG = ${QTCURL_DEBUG})
message(QT_QTCORE_LIBRARY = ${QT_QTCORE_LIBRARY})
message(CURL_LIBRARIES = ${CURL_LIBRARIES})
set(P_LIB "-qtcurl")
message(STATUS "Building library: ${P_LIB}")
set(P_LIB_SRC
QtCUrl.cpp
)
add_library(${P_LIB} SHARED
${P_LIB_SRC}
)