1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-08-21 15:50:50 +00:00

Make symlink to postgresql backend

This is helpful so when running dindexer in a dev environment you don't
need to list all the possible paths to every backend. Symlinks to all
backends will all be in the same place.
This commit is contained in:
King_DuckZ 2016-06-06 20:24:05 +02:00
parent 624bba121f
commit 3fe962a8e5
4 changed files with 12 additions and 2 deletions

View file

@ -1,5 +1,14 @@
project(${bare_name}-backend CXX)
set(BACKEND_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
function(ln_backend backend_name)
add_custom_command(TARGET "${backend_name}" POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE:${backend_name}> ${BACKEND_BINARY_DIR}/$<TARGET_FILE_NAME:${backend_name}>
DEPENDS ${BACKEND_BINARY_DIR}/$<TARGET_FILE_NAME:${backend_name}>
COMMENT "Creating symlink to ${backend_name}"
)
endfunction()
add_library(${PROJECT_NAME} STATIC
backend_loader.cpp
)
@ -25,5 +34,4 @@ target_link_libraries(${PROJECT_NAME}
#)
add_subdirectory(postgresql)
add_dependencies(${PROJECT_NAME} ${bare_name}-backend-postgresql)