source: src/webservice/CMakeLists.txt@ 4b09d68

Last change on this file since 4b09d68 was d55ec21, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago
  • Improved testing execution of webservice related tests (they use the built in php webserver to create a test webservice instance)
  • Property mode set to 100644
File size: 2.5 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_APP_DIRECTORY "${WEBSERVICE_OUTPUT_DIRECTORY}/${WEBSERVICE_API_VERSION}")
23
24# switch Slim mode according to CMake debug mode
25SET(WEBSERVICE_MODE "production")
26IF(BUILD_DEBUG)
27 SET(WEBSERVICE_MODE "development")
28ENDIF(BUILD_DEBUG)
29
30# ADD_CUSTOM_COMMAND(
31# OUTPUT
32# "${WEBCLIENT_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
33# COMMAND ${CMAKE_COMMAND} -E copy_directory ${STAFF_WSDL_PATH} ${WEBSERVICE_OUTPUT_DIRECTORY}
34# WORKING_DIRECTORY "${STAFF_WSDL_PATH}"
35# )
36
37CONFIGURE_FILE("config/config.php.in" "${WEBSERVICE_OUTPUT_DIRECTORY}/config/config.php")
38CONFIGURE_FILE("config/internalconfig.php.in" "${WEBSERVICE_OUTPUT_APP_DIRECTORY}/inc/internalconfig.php")
39# workaround to copy "hidden" file .htaccess. copy command ignores it
40CONFIGURE_FILE("htaccess.in" "${WEBSERVICE_OUTPUT_APP_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_APP_DIRECTORY}"
45# DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
46 COMMENT "Preparing webservice"
47 SOURCES ${src_HTDOCS}
48)
49
50#######################
51#
52# PHPUnit tests
53#
54#######################
55CONFIGURE_FILE("testconfig/testconfig.php.in" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}/testconfig/testconfig.php")
56
57FILE(GLOB src_HTDOCS_TEST "tests/*.*")
58ADD_CUSTOM_TARGET(webservice-tests-prepare ALL
59 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/tests" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}"
60# DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
61 COMMENT "Preparing webservice tests"
62 SOURCES ${src_HTDOCS_TEST}
63)
Note: See TracBrowser for help on using the repository browser.