Fix a configuration error when building drogon_ctl (#1544)

This commit is contained in:
An Tao 2023-03-24 10:20:25 +08:00 committed by GitHub
parent 4f066258f2
commit 02742e4518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,11 @@ add_executable(_drogon_ctl
target_link_libraries(_drogon_ctl ${PROJECT_NAME})
if (WIN32 AND BUILD_SHARED_LIBS)
set(DROGON_FILE $<TARGET_FILE:drogon>)
set(TRANTOR_FILE $<TARGET_FILE:trantor>)
if (USE_SUBMODULE)
set(TRANTOR_FILE $<TARGET_FILE:trantor>)
else()
set(TRANTOR_FILE $<TARGET_FILE:Trantor::Trantor>)
endif()
add_custom_command(TARGET _drogon_ctl POST_BUILD
COMMAND ${CMAKE_COMMAND}
-DCTL_FILE=${DROGON_FILE}