diff options
Diffstat (limited to 'project/cmake/modules/FindTexturePacker.cmake')
| -rw-r--r-- | project/cmake/modules/FindTexturePacker.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindTexturePacker | ||
| 3 | # ----------------- | ||
| 4 | # Finds the TexturePacker | ||
| 5 | # | ||
| 6 | # This will define the following (imported) targets:: | ||
| 7 | # | ||
| 8 | # TexturePacker::TexturePacker - The TexturePacker executable | ||
| 9 | |||
| 10 | if(NOT TARGET TexturePacker::TexturePacker) | ||
| 11 | if(CMAKE_CROSSCOMPILING) | ||
| 12 | add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) | ||
| 13 | set_target_properties(TexturePacker::TexturePacker PROPERTIES | ||
| 14 | IMPORTED_LOCATION "${NATIVEPREFIX}/bin/TexturePacker") | ||
| 15 | elseif(WIN32) | ||
| 16 | add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) | ||
| 17 | set_target_properties(TexturePacker::TexturePacker PROPERTIES | ||
| 18 | IMPORTED_LOCATION "${CORE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") | ||
| 19 | else() | ||
| 20 | add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker) | ||
| 21 | add_executable(TexturePacker::TexturePacker ALIAS TexturePacker) | ||
| 22 | endif() | ||
| 23 | endif() | ||
