-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
67 lines (57 loc) · 1.17 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 2.6)
project(qtorm)
find_package(Qt4 REQUIRED)
include(GNUInstallDirs)
add_definitions(-fPIC)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTSQL_INCLUDE_DIR}
${QT_INCLUDE_DIR}
${QT_QT_INCLUDE_DIR}
)
# Sources
set(qtorm_SRCS
qassign.cpp
qdatetimefield.cpp
qdoublefield.cpp
qf.cpp
qfield.cpp
qforeignkey.cpp
qintfield.cpp
qmodel.cpp
qqueryset.cpp
qstringfield.cpp
qwhere.cpp
qtormdatabase.cpp
)
set(qtorm_HEADERS
qassign.h
qdatetimefield.h
qdoublefield.h
qf.h
qfield.h
qfield_p.h
qforeignkey.h
qforeignkey_p.h
qintfield.h
qmodel.h
qqueryset.h
qstringfield.h
qwhere.h
qtormdatabase.h
)
# Automoc
qt4_automoc(${qtorm_SRCS})
# Shared library
add_library(qtorm SHARED ${qtorm_SRCS})
set_target_properties(qtorm PROPERTIES
VERSION 0.1.0
SOVERSION 0.1.0
)
target_link_libraries(qtorm
${QT_QTCORE_LIBRARY}
${QT_QTSQL_LIBRARY}
)
install(TARGETS qtorm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${qtorm_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qtorm)