1
PROJECT(libqxtweb-standalone)
2
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
3
SET(CMAKE_VERBOSE_MAKEFILE ON)
4
SET(CMAKE_INSTALL_PREFIX ".")
6
IF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
7
CMAKE_POLICY(SET CMP0017 NEW)
8
ENDIF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
10
FIND_PACKAGE( Qt4 4.6.0 COMPONENTS QtCore QtNetwork REQUIRED )
11
set(QT_USE_QTNETWORK TRUE)
12
include( ${QT_USE_FILE} )
16
ADD_DEFINITIONS(-Wall -O2 -DNDEBUG)
18
ADD_DEFINITIONS(-fPIC)
20
ADD_DEFINITIONS( -DBUILD_QXT_CORE -DBUILD_QXT_WEB )
23
INCLUDE_DIRECTORIES( ${qxtweb} )
28
${qxtweb}/qxtabstracthttpconnector.cpp
29
${qxtweb}/qxtabstractwebservice.cpp
30
${qxtweb}/qxtabstractwebsessionmanager.cpp
31
${qxtweb}/qxthtmltemplate.cpp
32
${qxtweb}/qxthttpserverconnector.cpp
33
${qxtweb}/qxthttpsessionmanager.cpp
34
${qxtweb}/qxtscgiserverconnector.cpp
35
${qxtweb}/qxtwebcontent.cpp
36
${qxtweb}/qxtwebevent.cpp
37
${qxtweb}/qxtwebservicedirectory.cpp
38
${qxtweb}/qxtwebslotservice.cpp
39
${qxtweb}/qxtwebcgiservice.cpp
41
# Ripped bits of QxtCore:
42
${qxtweb}/qxtmetaobject.cpp
48
${qxtweb}/qxtabstracthttpconnector.h
49
${qxtweb}/qxtabstractwebservice.h
50
${qxtweb}/qxtabstractwebsessionmanager.h
51
${qxtweb}/qxtabstractwebsessionmanager_p.h
52
# ${qxtweb}/qxthtmltemplate.h
53
${qxtweb}/qxthttpsessionmanager.h
55
${qxtweb}/qxtwebcontent.h
56
# ${qxtweb}/qxtwebevent.h
57
${qxtweb}/qxtwebservicedirectory.h
58
${qxtweb}/qxtwebservicedirectory_p.h
59
${qxtweb}/qxtwebslotservice.h
60
${qxtweb}/qxtwebcgiservice.h
61
${qxtweb}/qxtwebcgiservice_p.h
63
# Ripped bits of QxtCore:
64
# ${qxtweb}/qxtmetaobject.h
65
# ${qxtweb}/qxtnullable.h
67
${qxtweb}/qxtboundfunction.h
68
# ${qxtweb}/qxtboundfunctionbase.h
69
# ${qxtweb}/qxtboundcfunction.h
70
# ${qxtweb}/qxtmetatype.h
73
qt4_wrap_cpp( mocstuff ${headers} )
75
# DLL on windows due to linker issues, otherwise static
77
ADD_LIBRARY(qxtweb-standalone SHARED
82
INSTALL( TARGETS qxtweb-standalone
83
RUNTIME DESTINATION bin
84
LIBRARY DESTINATION lib
85
ARCHIVE DESTINATION lib
88
ADD_LIBRARY(qxtweb-standalone STATIC
96
target_link_libraries( qxtweb-standalone
100
# Also build small example app from qxt demos:
102
#qt4_wrap_cpp( mocex "example/myservice.h" )
104
#ADD_EXECUTABLE( example-webserver
107
# example/myservice.h
110
#TARGET_LINK_LIBRARIES( example-webserver
112
# "${CMAKE_CURRENT_SOURCE_DIR}/libqxtweb-standalone.a"