source: src/webservice/CMakeLists.txt@ 851179e

Last change on this file since 851179e was 1c92d58, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago

First version of a getStations implementation and related tests

  • Property mode set to 100644
File size: 2.7 KB
Line 
1######################
2#
3# Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
4#
5# This library is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
9#
10# This library is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Lesser General Public License for more details.
14#
15# You should have received a copy of the GNU Lesser General Public
16# License along with this library; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18# MA 02110-1301 USA.
19#
20######################
21
22SET(WEBSERVICE_OUTPUT_DIRECTORY "${WEB_OUTPUT_DIRECTORY}/webservice")
23SET(WEBSERVICE_TEST_OUTPUT_DIRECTORY "${WEB_TEST_OUTPUT_DIRECTORY}/webservice")
24
25# switch Slim mode according to CMake debug mode
26SET(WEBSERVICE_MODE "production")
27IF(BUILD_DEBUG)
28 SET(WEBSERVICE_MODE "development")
29ENDIF(BUILD_DEBUG)
30
31# ADD_CUSTOM_COMMAND(
32# OUTPUT
33# "${WEBCLIENT_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
34# COMMAND ${CMAKE_COMMAND} -E copy_directory ${STAFF_WSDL_PATH} ${WEBSERVICE_OUTPUT_DIRECTORY}
35# WORKING_DIRECTORY "${STAFF_WSDL_PATH}"
36# )
37
38CONFIGURE_FILE("config/config.php.in" "${WEBSERVICE_OUTPUT_DIRECTORY}/config/config.php")
39# workaround to copy "hidden" file .htaccess. copy command ignores it
40CONFIGURE_FILE("htaccess.in" "${WEBSERVICE_OUTPUT_DIRECTORY}/.htaccess")
41
42FILE(GLOB src_HTDOCS "htdocs/*.*")
43ADD_CUSTOM_TARGET(webservice-prepare ALL
44 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/htdocs" "${WEBSERVICE_OUTPUT_DIRECTORY}"
45# DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
46 COMMENT "Preparing webservice"
47 SOURCES ${src_HTDOCS}
48)
49# ADD_CUSTOM_TARGET(webservice-install ALL
50# COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/htdocs" "${WEBSERVICE_OUTPUT_DIRECTORY}"
51# # DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
52# COMMENT "Preparing webclient"
53# SOURCES ${src_HTDOCS}
54# )
55
56
57
58
59
60
61
62
63
64#######################
65#
66# PHPUnit tests
67#
68#######################
69CONFIGURE_FILE("testconfig/testconfig.php.in" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}/testconfig/testconfig.php")
70
71FILE(GLOB src_HTDOCS_TEST "tests/*.*")
72ADD_CUSTOM_TARGET(webservice-tests-prepare ALL
73 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/tests" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}"
74# DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
75 COMMENT "Preparing webservice tests"
76 SOURCES ${src_HTDOCS_TEST}
77)
Note: See TracBrowser for help on using the repository browser.