From f44ecaa4f27e7538ddcad66d40e543bffa2d2d86 Mon Sep 17 00:00:00 2001 From: manuel Date: Sun, 4 Jun 2017 16:57:49 +0200 Subject: sync with upstream --- cmake/modules/FindJsonSchemaBuilder.cmake | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 cmake/modules/FindJsonSchemaBuilder.cmake (limited to 'cmake/modules/FindJsonSchemaBuilder.cmake') diff --git a/cmake/modules/FindJsonSchemaBuilder.cmake b/cmake/modules/FindJsonSchemaBuilder.cmake new file mode 100644 index 0000000..9a31dd5 --- /dev/null +++ b/cmake/modules/FindJsonSchemaBuilder.cmake @@ -0,0 +1,26 @@ +#.rst: +# FindJsonSchemaBuilder +# --------------------- +# Finds the JsonSchemaBuilder +# +# This will define the following (imported) targets:: +# +# JsonSchemaBuilder::JsonSchemaBuilder - The JsonSchemaBuilder executable + +if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder) + if(KODI_DEPENDSBUILD OR CMAKE_CROSSCOMPILING) + add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL) + if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore) + set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES + IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/project/BuildDependencies/bin/json-rpc/JsonSchemaBuilder") + else() + set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES + IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder") + endif() + set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES FOLDER Tools) + else() + add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder) + add_executable(JsonSchemaBuilder::JsonSchemaBuilder ALIAS JsonSchemaBuilder) + set_target_properties(JsonSchemaBuilder PROPERTIES FOLDER Tools) + endif() +endif() -- cgit v1.2.3