forked from qnective/qjson-backport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (37 loc) · 796 Bytes
/
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
cmake_minimum_required (VERSION 2.6)
project (qjson)
# The version number.
set (qjson_VERSION_MAJOR 1)
set (qjson_VERSION_MINOR 0)
#Find the required libs
find_package(GTest REQUIRED)
find_package(Qt4 REQUIRED QtCore QtXml)
include(${QT_USE_FILE})
# Add the lib
add_library(qjson-backport SHARED
qjson.cpp
qjsonarray.cpp
qjsondocument.cpp
qjsonobject.cpp
qjsonparser.cpp
qjsonvalue.cpp
qjsonwriter.cpp
)
# Add the executable target
add_executable(qjson_backport_test
main.cpp
)
include_directories(
${PROJECT_SOURCE_DIR}
${GTEST_INCLUDE_DIRS}
${QT_QTCORE_INCLUDE_DIR}
${QT_HEADERS_DIR}
)
target_link_libraries(qjson-backport
${QT_LIBRARIES}
)
target_link_libraries(qjson_backport_test
qjson-backport
${GTEST_LIBRARIES}
)
add_custom_target(check qjson_backport_test)