diff --git a/CMakeLists.txt b/CMakeLists.txt index 15d347c..f50273a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,13 +18,15 @@ aux_source_directory(src/helpers HELPERS_SRC) aux_source_directory(src/handlers HANDLERS_SRC) aux_source_directory(src/endpoints ENDPOINTS_SRC) +add_dependencies(core migrations) + configure_file("core.ini" "core.ini" COPYONLY) target_sources(core PRIVATE ${SRC_DIR} ${HANDLERS_SRC} ${HELPERS_SRC} ${MODELS_SRC} ${ENDPOINTS_SRC}) target_include_directories(core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) target_include_directories(core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/vendor) -add_custom_target(migrations ALL +add_custom_target(migrations COMMAND ./compile_migrations.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )