Skip to content

Commit

Permalink
cmake bugfix BUILD_TREE_DEPLOY on MSYS2
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Apr 13, 2024
1 parent 347f0cf commit 3c32c9e
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions cmake/Modules/TinyDeployment.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ endfunction()
function(tiny_build_tree_deployment)

# Nothing to do
if(TINY_VCPKG OR NOT MSVC OR NOT BUILD_SHARED_LIBS)
if(TINY_VCPKG OR (NOT MSVC AND NOT MINGW) OR NOT BUILD_SHARED_LIBS)
return()
endif()

Expand All @@ -345,17 +345,28 @@ function(tiny_build_tree_deployment)
if(TINY_BUILD_LOADABLE_DRIVERS OR TINY_BUILD_SHARED_DRIVERS)
list(APPEND filesToDeploy
$<TARGET_FILE:${TinyDrivers_target}>
$<$<CONFIG:Debug,RelWithDebInfo>:$<TARGET_PDB_FILE:${TinyDrivers_target}>>
)
endif()

if(TINY_BUILD_LOADABLE_DRIVERS)
list(APPEND filesToDeploy
$<TARGET_FILE:${TinyMySql_target}>
$<$<CONFIG:Debug,RelWithDebInfo>:$<TARGET_PDB_FILE:${TinyMySql_target}>>
)
endif()

# Only MSVC have PDB files
if(MSVC)
list(APPEND filesToDeploy
$<$<CONFIG:Debug,RelWithDebInfo>:$<TARGET_PDB_FILE:${TinyDrivers_target}>>
)

if(TINY_BUILD_LOADABLE_DRIVERS)
list(APPEND filesToDeploy
$<$<CONFIG:Debug,RelWithDebInfo>:$<TARGET_PDB_FILE:${TinyMySql_target}>>
)
endif()
endif()

list(LENGTH filesToDeploy filesToDeployCount)

if((TINY_BUILD_LOADABLE_DRIVERS OR TINY_BUILD_SHARED_DRIVERS) AND
Expand Down

0 comments on commit 3c32c9e

Please sign in to comment.