blob: 20d2ef7ea0cd7b4d5347b7c591e4423e3dd0906c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#.rst:
# FindTexturePacker
# -----------------
# Finds the TexturePacker
#
# If WITH_TEXTUREPACKER is defined and points to a directory,
# this path will be used to search for the Texturepacker binary
#
#
# This will define the following (imported) targets::
#
# TexturePacker::TexturePacker - The TexturePacker executable
if(NOT TARGET TexturePacker::TexturePacker)
if(KODI_DEPENDSBUILD)
get_filename_component(_tppath "${NATIVEPREFIX}/bin" ABSOLUTE)
find_program(TEXTUREPACKER_EXECUTABLE NAMES "${APP_NAME_LC}-TexturePacker" TexturePacker
HINTS ${_tppath})
add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL)
set_target_properties(TexturePacker::TexturePacker PROPERTIES
IMPORTED_LOCATION "${TEXTUREPACKER_EXECUTABLE}")
elseif(WIN32)
get_filename_component(_tppath "${DEPENDENCIES_DIR}/tools/TexturePacker" ABSOLUTE)
find_program(TEXTUREPACKER_EXECUTABLE NAMES "${APP_NAME_LC}-TexturePacker.exe" TexturePacker.exe
HINTS ${_tppath})
add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL)
set_target_properties(TexturePacker::TexturePacker PROPERTIES
IMPORTED_LOCATION "${TEXTUREPACKER_EXECUTABLE}")
else()
if(WITH_TEXTUREPACKER)
get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE)
find_program(TEXTUREPACKER_EXECUTABLE NAMES "${APP_NAME_LC}-TexturePacker" TexturePacker
PATHS ${_tppath})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TexturePacker DEFAULT_MSG TEXTUREPACKER_EXECUTABLE)
if(TEXTUREPACKER_FOUND)
add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL)
set_target_properties(TexturePacker::TexturePacker PROPERTIES
IMPORTED_LOCATION "${TEXTUREPACKER_EXECUTABLE}")
endif()
mark_as_advanced(TEXTUREPACKER)
else()
add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker)
add_executable(TexturePacker::TexturePacker ALIAS TexturePacker)
endif()
endif()
endif()
|