~ubuntu-branches/ubuntu/trusty/tomahawk/trusty-proposed

« back to all changes in this revision

Viewing changes to thirdparty/qxt/qxtweb-standalone/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-03-07 21:50:13 UTC
  • Revision ID: package-import@ubuntu.com-20130307215013-6gdjkdds7i9uenvs
Tags: upstream-0.6.0+dfsg
ImportĀ upstreamĀ versionĀ 0.6.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
PROJECT(libqxtweb-standalone)
 
2
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
 
3
SET(CMAKE_VERBOSE_MAKEFILE ON)
 
4
SET(CMAKE_INSTALL_PREFIX ".")
 
5
 
 
6
IF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
 
7
  CMAKE_POLICY(SET CMP0017 NEW)
 
8
ENDIF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
 
9
 
 
10
FIND_PACKAGE( Qt4 4.6.0 COMPONENTS QtCore QtNetwork REQUIRED )
 
11
set(QT_USE_QTNETWORK TRUE)
 
12
include( ${QT_USE_FILE} )
 
13
 
 
14
SET(qxtweb "qxtweb")
 
15
 
 
16
ADD_DEFINITIONS(-Wall -O2 -DNDEBUG)
 
17
IF(NOT WIN32)
 
18
        ADD_DEFINITIONS(-fPIC)
 
19
ENDIF()
 
20
ADD_DEFINITIONS( -DBUILD_QXT_CORE -DBUILD_QXT_WEB )
 
21
 
 
22
 
 
23
INCLUDE_DIRECTORIES( ${qxtweb} )
 
24
 
 
25
 
 
26
SET( sources
 
27
        # 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
 
40
 
 
41
        # Ripped bits of QxtCore:
 
42
        ${qxtweb}/qxtmetaobject.cpp
 
43
        ${qxtweb}/qxtnull.cpp
 
44
)
 
45
 
 
46
SET( headers
 
47
        # QxtWeb:
 
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
 
54
#        ${qxtweb}/qxtweb.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
 
62
 
 
63
        # Ripped bits of QxtCore:
 
64
#        ${qxtweb}/qxtmetaobject.h
 
65
#        ${qxtweb}/qxtnullable.h
 
66
#        ${qxtweb}/qxtnull.h
 
67
        ${qxtweb}/qxtboundfunction.h
 
68
#        ${qxtweb}/qxtboundfunctionbase.h
 
69
#        ${qxtweb}/qxtboundcfunction.h
 
70
#        ${qxtweb}/qxtmetatype.h
 
71
)
 
72
 
 
73
qt4_wrap_cpp( mocstuff ${headers} )
 
74
 
 
75
# DLL on windows due to linker issues, otherwise static
 
76
IF(WIN32)
 
77
        ADD_LIBRARY(qxtweb-standalone SHARED
 
78
                        ${mocstuff}
 
79
                        ${headers}
 
80
                        ${sources}
 
81
        )
 
82
    INSTALL( TARGETS qxtweb-standalone
 
83
             RUNTIME DESTINATION bin
 
84
             LIBRARY DESTINATION lib
 
85
             ARCHIVE DESTINATION lib
 
86
    )
 
87
ELSE()
 
88
        ADD_LIBRARY(qxtweb-standalone STATIC
 
89
                        ${mocstuff}
 
90
                        ${headers}
 
91
                        ${sources}
 
92
        )
 
93
ENDIF()
 
94
 
 
95
 
 
96
target_link_libraries( qxtweb-standalone
 
97
            ${QT_LIBRARIES}
 
98
)
 
99
 
 
100
# Also build small example app from qxt demos:
 
101
 
 
102
#qt4_wrap_cpp( mocex "example/myservice.h" )
 
103
 
 
104
#ADD_EXECUTABLE( example-webserver
 
105
#    ${mocex}
 
106
#    example/main.cpp
 
107
#    example/myservice.h
 
108
#    )
 
109
 
 
110
#TARGET_LINK_LIBRARIES( example-webserver
 
111
#    ${QT_LIBRARIES}
 
112
#    "${CMAKE_CURRENT_SOURCE_DIR}/libqxtweb-standalone.a"
 
113
#    )