From 9fc8b732737f139d3e466510d75668ab45578960 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 8 Mar 2016 21:02:53 +0100 Subject: sync with upstream --- project/cmake/modules/FindTexturePacker.cmake | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 project/cmake/modules/FindTexturePacker.cmake (limited to 'project/cmake/modules/FindTexturePacker.cmake') diff --git a/project/cmake/modules/FindTexturePacker.cmake b/project/cmake/modules/FindTexturePacker.cmake new file mode 100644 index 0000000..2229ff7 --- /dev/null +++ b/project/cmake/modules/FindTexturePacker.cmake @@ -0,0 +1,23 @@ +#.rst: +# FindTexturePacker +# ----------------- +# Finds the TexturePacker +# +# This will define the following (imported) targets:: +# +# TexturePacker::TexturePacker - The TexturePacker executable + +if(NOT TARGET TexturePacker::TexturePacker) + if(CMAKE_CROSSCOMPILING) + add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) + set_target_properties(TexturePacker::TexturePacker PROPERTIES + IMPORTED_LOCATION "${NATIVEPREFIX}/bin/TexturePacker") + elseif(WIN32) + add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) + set_target_properties(TexturePacker::TexturePacker PROPERTIES + IMPORTED_LOCATION "${CORE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") + else() + add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker) + add_executable(TexturePacker::TexturePacker ALIAS TexturePacker) + endif() +endif() -- cgit v1.2.3