| [16cceaa] | 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 |
|
|---|
| 22 | IF(WITH_LOCAL_PHPSLIM)
|
|---|
| [01a620f] | 23 | FILE(GLOB src_HTDOCS "php/vendor/slim/*.*")
|
|---|
| [16cceaa] | 24 | ADD_CUSTOM_TARGET(php-slim ALL
|
|---|
| [92c9c7c] | 25 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/slim" "${WEB_OUTPUT_DIRECTORY}/vendor/slim"
|
|---|
| [01a620f] | 26 | COMMENT "Preparing webservice (php-slim)"
|
|---|
| [16cceaa] | 27 | SOURCES ${src_HTDOCS}
|
|---|
| 28 | )
|
|---|
| [01a620f] | 29 | ENDIF()
|
|---|
| 30 |
|
|---|
| [92c9c7c] | 31 | # Currently the autoloader needs also the guzzlehttp directory,
|
|---|
| 32 | # therefore we must put it into the webservice folder two
|
|---|
| 33 | # IF(WITH_LOCAL_PHPGUZZLE AND BUILD_TESTING)
|
|---|
| [01a620f] | 34 | FILE(GLOB src_HTDOCS "php/vendor/guzzlehttp/*.*")
|
|---|
| [92c9c7c] | 35 |
|
|---|
| 36 | ADD_CUSTOM_TARGET(guzzle-prepare ALL
|
|---|
| 37 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/guzzlehttp" "${WEB_OUTPUT_DIRECTORY}/vendor/guzzlehttp"
|
|---|
| 38 | COMMENT "Preparing webservice (php-guzzle)"
|
|---|
| 39 | SOURCES ${src_HTDOCS}
|
|---|
| 40 | )
|
|---|
| 41 | FILE(GLOB src_HTDOCS "php/vendor/psr/*.*")
|
|---|
| 42 | ADD_CUSTOM_TARGET(psr-prepare ALL
|
|---|
| 43 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/psr" "${WEB_OUTPUT_DIRECTORY}/vendor/psr"
|
|---|
| 44 | COMMENT "Preparing webservice (php-psr)"
|
|---|
| 45 | SOURCES ${src_HTDOCS}
|
|---|
| 46 | )
|
|---|
| 47 |
|
|---|
| [01a620f] | 48 | ADD_CUSTOM_TARGET(guzzle-prepare-tests ALL
|
|---|
| 49 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/guzzlehttp" "${WEB_TEST_OUTPUT_DIRECTORY}/vendor/guzzlehttp"
|
|---|
| 50 | COMMENT "Preparing webservice tests (php-guzzle)"
|
|---|
| 51 | SOURCES ${src_HTDOCS}
|
|---|
| 52 | )
|
|---|
| [92c9c7c] | 53 | # FILE(GLOB src_HTDOCS "php/vendor/psr/*.*")
|
|---|
| [01a620f] | 54 | ADD_CUSTOM_TARGET(psr-prepare-tests ALL
|
|---|
| 55 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/psr" "${WEB_TEST_OUTPUT_DIRECTORY}/vendor/psr"
|
|---|
| 56 | COMMENT "Preparing webservice tests (php-psr)"
|
|---|
| 57 | SOURCES ${src_HTDOCS}
|
|---|
| 58 | )
|
|---|
| [92c9c7c] | 59 | # ENDIF()
|
|---|
| [01a620f] | 60 |
|
|---|
| 61 | IF(WITH_LOCAL_PHPSLIM OR WITH_LOCAL_PHPGUZZLE)
|
|---|
| 62 | SET(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/autoload.php")
|
|---|
| [92c9c7c] | 63 | SET(TARGET_AUTOLOAD "${WEB_OUTPUT_DIRECTORY}/vendor/autoload.php")
|
|---|
| [01a620f] | 64 | SET(TARGET_AUTOLOAD_TEST "${WEB_TEST_OUTPUT_DIRECTORY}/vendor/autoload.php")
|
|---|
| 65 |
|
|---|
| 66 | FILE(GLOB src_HTDOCS "php/vendor/composer/*.*")
|
|---|
| 67 | ADD_CUSTOM_TARGET(composer-prepare ALL
|
|---|
| [92c9c7c] | 68 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/composer" "${WEB_OUTPUT_DIRECTORY}/vendor/composer"
|
|---|
| [01a620f] | 69 | DEPENDS ${TARGET_AUTOLOAD}
|
|---|
| 70 | COMMENT "Preparing webservice (php-composer)"
|
|---|
| 71 | SOURCES ${src_HTDOCS}
|
|---|
| 72 | )
|
|---|
| 73 | ADD_CUSTOM_TARGET(composer-prepare-tests ALL
|
|---|
| 74 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/php/vendor/composer" "${WEB_TEST_OUTPUT_DIRECTORY}/vendor/composer"
|
|---|
| 75 | DEPENDS ${TARGET_AUTOLOAD_TEST}
|
|---|
| 76 | COMMENT "Preparing webservice tests (php-composer)"
|
|---|
| 77 | SOURCES ${src_HTDOCS}
|
|---|
| 78 | )
|
|---|
| 79 | ADD_CUSTOM_COMMAND(
|
|---|
| 80 | OUTPUT ${TARGET_AUTOLOAD}
|
|---|
| 81 | COMMAND ${CMAKE_COMMAND} -E copy "${SOURCE}" "${TARGET_AUTOLOAD}"
|
|---|
| 82 | )
|
|---|
| 83 | ADD_CUSTOM_COMMAND(
|
|---|
| 84 | OUTPUT ${TARGET_AUTOLOAD_TEST}
|
|---|
| 85 | COMMAND ${CMAKE_COMMAND} -E copy "${SOURCE}" "${TARGET_AUTOLOAD_TEST}"
|
|---|
| 86 | )
|
|---|
| 87 | ENDIF()
|
|---|