diff options
| author | ruki <[email protected]> | 2022-03-22 00:52:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-03-22 00:52:25 +0800 |
| commit | fb5f37067336a438f5e8adff01652e07bfee86fa (patch) | |
| tree | 4ab7179f2df72614eccc55d6deba1550829c35aa | |
| parent | 23afe620fa37835e61dfc44070b35b97d43b118b (diff) | |
fix cmakelists
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 6484e09d4..731363bb2 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -161,7 +161,12 @@ end function _add_target_shared(cmakelists, target) cmakelists:print("add_library(%s SHARED \"\")", target:name()) cmakelists:print("set_target_properties(%s PROPERTIES OUTPUT_NAME \"%s\")", target:name(), target:basename()) - cmakelists:print("set_target_properties(%s PROPERTIES LIBRARY_OUTPUT_DIRECTORY \"%s\")", target:name(), _get_unix_path_relative_to_cmake(target:targetdir())) + if target:is_plat("windows") then + -- @see https://github.com/xmake-io/xmake/issues/2192 + cmakelists:print("set_target_properties(%s PROPERTIES RUNTIME_OUTPUT_DIRECTORY \"%s\")", target:name(), _get_unix_path_relative_to_cmake(target:targetdir())) + else + cmakelists:print("set_target_properties(%s PROPERTIES LIBRARY_OUTPUT_DIRECTORY \"%s\")", target:name(), _get_unix_path_relative_to_cmake(target:targetdir())) + end end -- add target: headeronly |
