source: src/webservice/CMakeLists.txt@ 552da81

Last change on this file since 552da81 was 1e37648, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago
  • Rewrites are now working
    • Setup is now accessable via Slim too
    • Added 404 template to Slim app
  • 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_OUTPUT_APP_DIRECTORY "${WEBSERVICE_OUTPUT_DIRECTORY}/${WEBSERVICE_API_VERSION}")
24SET(WEBSERVICE_TEST_OUTPUT_DIRECTORY "${WEB_TEST_OUTPUT_DIRECTORY}/webservice")
25
26# switch Slim mode according to CMake debug mode
27SET(WEBSERVICE_MODE "production")
28IF(BUILD_DEBUG)
29 SET(WEBSERVICE_MODE "development")
30ENDIF(BUILD_DEBUG)
31
32# ADD_CUSTOM_COMMAND(
33# OUTPUT
34# "${WEBCLIENT_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
35# COMMAND ${CMAKE_COMMAND} -E copy_directory ${STAFF_WSDL_PATH} ${WEBSERVICE_OUTPUT_DIRECTORY}
36# WORKING_DIRECTORY "${STAFF_WSDL_PATH}"
37# )
38
39CONFIGURE_FILE("config/config.php.in" "${WEBSERVICE_OUTPUT_DIRECTORY}/config/config.php")
40CONFIGURE_FILE("config/internalconfig.php.in" "${WEBSERVICE_OUTPUT_APP_DIRECTORY}/inc/internalconfig.php")
41# workaround to copy "hidden" file .htaccess. copy command ignores it
42CONFIGURE_FILE("htaccess.in" "${WEBSERVICE_OUTPUT_APP_DIRECTORY}/.htaccess")
43
44FILE(GLOB src_HTDOCS "htdocs/*.*")
45ADD_CUSTOM_TARGET(webservice-prepare ALL
46 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/htdocs" "${WEBSERVICE_OUTPUT_APP_DIRECTORY}"
47# DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
48 COMMENT "Preparing webservice"
49 SOURCES ${src_HTDOCS}
50)
51
52#######################
53#
54# PHPUnit tests
55#
56#######################
57CONFIGURE_FILE("testconfig/testconfig.php.in" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}/testconfig/testconfig.php")
58
59FILE(GLOB src_HTDOCS_TEST "tests/*.*")
60ADD_CUSTOM_TARGET(webservice-tests-prepare ALL
61 COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/tests" "${WEBSERVICE_TEST_OUTPUT_DIRECTORY}"
62# DEPENDS "${WEBSERVICE_OUTPUT_DIRECTORY}/${STAFF_WSDL_FILE}"
63 COMMENT "Preparing webservice tests"
64 SOURCES ${src_HTDOCS_TEST}
65)
Note: See TracBrowser for help on using the repository browser.