aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwan BERNARD <edmBernard@users.noreply.github.com>2018-10-16 11:27:22 +0200
committerRobert Schumacher <roschuma@microsoft.com>2018-10-16 02:27:22 -0700
commitd798fd304018452c2c850e9f5aa4b54e389ca30f (patch)
treedbcd34326c8c105b9be4c37f726ee71d9dc02dc8
parentde7bc03245397aea13d5e29677dd717ee4473054 (diff)
downloadvcpkg-d798fd304018452c2c850e9f5aa4b54e389ca30f.tar.gz
vcpkg-d798fd304018452c2c850e9f5aa4b54e389ca30f.zip
[flatbuffers] fix executable remaining in bin folder (#4294)
* [flatbuffers] fix executable remaining in bin folder * [flatbuffers] clean portfile for flatc executable
-rw-r--r--ports/flatbuffers/portfile.cmake16
1 files changed, 8 insertions, 8 deletions
diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake
index 51212bd32..b6a0e6ba5 100644
--- a/ports/flatbuffers/portfile.cmake
+++ b/ports/flatbuffers/portfile.cmake
@@ -30,22 +30,22 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/flatbuffers")
-if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin AND NOT EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/flatc)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
-endif()
-if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/flatc.exe)
+file(GLOB flatc_path ${CURRENT_PACKAGES_DIR}/bin/flatc*)
+if(flatc_path)
make_directory(${CURRENT_PACKAGES_DIR}/tools/flatbuffers)
+ get_filename_component(flatc_executable ${flatc_path} NAME)
file(
RENAME
- ${CURRENT_PACKAGES_DIR}/bin/flatc.exe
- ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/flatc.exe
+ ${flatc_path}
+ ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/${flatc_executable}
)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
- vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/flatbuffers)
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/flatbuffers)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/flatbuffers)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/flatbuffers/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/flatbuffers/copyright)
+