diff --git a/web/CMakeLists.txt b/web/CMakeLists.txt index b122bea4e..529ca0b09 100644 --- a/web/CMakeLists.txt +++ b/web/CMakeLists.txt @@ -10,3 +10,7 @@ configure_file(includes/config.php.in "${CMAKE_CURRENT_BINARY_DIR}/includes/conf install(DIRECTORY ajax css graphics includes js lang skins tools views DESTINATION "${ZM_WEBDIR}" PATTERN "*.in" EXCLUDE PATTERN "*Make*" EXCLUDE PATTERN "*cmake*" EXCLUDE REGEX "includes/config.php$" EXCLUDE) install(FILES index.php README.md DESTINATION "${ZM_WEBDIR}") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/includes/config.php" DESTINATION "${ZM_WEBDIR}/includes") + +# Install the mootools symlinks +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/mootools/mootools-core.js" DESTINATION "${ZM_WEBDIR}/tools/mootools") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/mootools/mootools-more.js" DESTINATION "${ZM_WEBDIR}/tools/mootools") diff --git a/web/tools/mootools/CMakeLists.txt b/web/tools/mootools/CMakeLists.txt index c71e77ff4..e1e957913 100644 --- a/web/tools/mootools/CMakeLists.txt +++ b/web/tools/mootools/CMakeLists.txt @@ -32,3 +32,11 @@ else(NOT mtmorelist) message(WARNING " Failed creating the required symlinks for mootools-more. Exit code: ${mtmoreresult}") endif(mtmoreresult) endif(NOT mtmorelist) + +# If this is an out-of-source build, copy the mootools files we picked to the binary directory +# This is required to fix a cmake bug regarding installing symlinks pointing to nonexistent files +if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) + execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${mtcorelatest}" "${CMAKE_CURRENT_BINARY_DIR}/${mtcorelatest}") + execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${mtmorelatest}" "${CMAKE_CURRENT_BINARY_DIR}/${mtmorelatest}") +endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) +