Web: Fix symbolic link creation
Before this update CMake would print an error message in the configure
step:
> CMake Error: failed to create symbolic link
> 'BUILD_DIRECTORY/bin/elektrad': no such file or directory
.
@@ -50,14 +50,13 @@ else ()
COMMAND
${CMAKE_COMMAND} ARGS -E env GO111MODULE=on PKG_CONFIG_PATH=${CMAKE_CURRENT_BINARY_DIR}/elektrad
${GO_EXECUTABLE} build -o "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad"
+ COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad"
+ "${CMAKE_BINARY_DIR}/bin/elektrad"
VERBATIM
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/elektrad"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/elektrad/main.go" ${ELEKTRA_LIBS_ELEKTRAD})
add_custom_target (elektrad ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad")
- execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad"
- "${CMAKE_BINARY_DIR}/bin/elektrad")
-
# build elektra-web
install (CODE "message (\"-- Installing: elektra-web > elektrad\")")
install (PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/elektrad/elektrad" DESTINATION "${install_directory}")
