summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindJsonSchemaBuilder.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2019-04-29 12:23:35 +0200
committermanuel <manuel@mausz.at>2019-04-29 12:23:35 +0200
commitcf85cccfdb1aa57b6246641f606563288e0870e5 (patch)
tree06b9d173bf466d555d99803d1bce388e666444e5 /cmake/modules/FindJsonSchemaBuilder.cmake
parent483c0b88bfc1b798396c31a4dd2f5239399ce59e (diff)
downloadkodi-pvr-build-cf85cccfdb1aa57b6246641f606563288e0870e5.tar.gz
kodi-pvr-build-cf85cccfdb1aa57b6246641f606563288e0870e5.tar.bz2
kodi-pvr-build-cf85cccfdb1aa57b6246641f606563288e0870e5.zip
sync with upstreamLeia
Diffstat (limited to 'cmake/modules/FindJsonSchemaBuilder.cmake')
-rw-r--r--cmake/modules/FindJsonSchemaBuilder.cmake38
1 files changed, 27 insertions, 11 deletions
diff --git a/cmake/modules/FindJsonSchemaBuilder.cmake b/cmake/modules/FindJsonSchemaBuilder.cmake
index 14aa2f5..094c2fa 100644
--- a/cmake/modules/FindJsonSchemaBuilder.cmake
+++ b/cmake/modules/FindJsonSchemaBuilder.cmake
@@ -3,24 +3,40 @@
3# --------------------- 3# ---------------------
4# Finds the JsonSchemaBuilder 4# Finds the JsonSchemaBuilder
5# 5#
6# If WITH_JSONSCHEMABUILDER is defined and points to a directory,
7# this path will be used to search for the JsonSchemaBuilder binary
8#
9#
6# This will define the following (imported) targets:: 10# This will define the following (imported) targets::
7# 11#
8# JsonSchemaBuilder::JsonSchemaBuilder - The JsonSchemaBuilder executable 12# JsonSchemaBuilder::JsonSchemaBuilder - The JsonSchemaBuilder executable
9 13
10if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder) 14if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder)
11 if(KODI_DEPENDSBUILD OR CMAKE_CROSSCOMPILING) 15 if(KODI_DEPENDSBUILD)
16 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
17 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
18 IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder")
19 elseif(CORE_SYSTEM_NAME STREQUAL windowsstore)
12 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL) 20 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
13 if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) 21 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
14 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES 22 IMPORTED_LOCATION "${DEPENDENCIES_DIR}/bin/json-rpc/JsonSchemaBuilder")
15 IMPORTED_LOCATION "${DEPENDENCIES_DIR}/bin/json-rpc/JsonSchemaBuilder") 23 else()
24 if(WITH_JSONSCHEMABUILDER)
25 get_filename_component(_jsbpath ${WITH_JSONSCHEMABUILDER} ABSOLUTE)
26 find_program(JSONSCHEMABUILDER_EXECUTABLE JsonSchemaBuilder PATHS ${_jsbpath})
27
28 include(FindPackageHandleStandardArgs)
29 find_package_handle_standard_args(JsonSchemaBuilder DEFAULT_MSG JSONSCHEMABUILDER_EXECUTABLE)
30 if(JSONSCHEMABUILDER_FOUND)
31 add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL)
32 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES
33 IMPORTED_LOCATION "${JSONSCHEMABUILDER_EXECUTABLE}")
34 endif()
35 mark_as_advanced(JSONSCHEMABUILDER)
16 else() 36 else()
17 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES 37 add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder)
18 IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder") 38 add_executable(JsonSchemaBuilder::JsonSchemaBuilder ALIAS JsonSchemaBuilder)
39 set_target_properties(JsonSchemaBuilder PROPERTIES FOLDER Tools)
19 endif() 40 endif()
20 set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES FOLDER Tools)
21 else()
22 add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder)
23 add_executable(JsonSchemaBuilder::JsonSchemaBuilder ALIAS JsonSchemaBuilder)
24 set_target_properties(JsonSchemaBuilder PROPERTIES FOLDER Tools)
25 endif() 41 endif()
26endif() 42endif()