diff options
| author | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
| commit | 5f8335c1e49ce108ef3481863833c98efa00411b (patch) | |
| tree | f02b5c1c9765bb6a14c8eb42bb4f81b9face0b55 /cmake/scripts/common/Macros.cmake | |
| parent | e317daf081a1048904fdf0b548946fa3ba6593a7 (diff) | |
| download | kodi-pvr-build-master.tar.gz kodi-pvr-build-master.tar.bz2 kodi-pvr-build-master.zip | |
Diffstat (limited to 'cmake/scripts/common/Macros.cmake')
| -rw-r--r-- | cmake/scripts/common/Macros.cmake | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake index eefd7c8..f7327e3 100644 --- a/cmake/scripts/common/Macros.cmake +++ b/cmake/scripts/common/Macros.cmake | |||
| @@ -111,26 +111,6 @@ function(core_add_test_library name) | |||
| 111 | endforeach() | 111 | endforeach() |
| 112 | endfunction() | 112 | endfunction() |
| 113 | 113 | ||
| 114 | # Add an addon callback library | ||
| 115 | # Arguments: | ||
| 116 | # name name of the library to add | ||
| 117 | # Implicit arguments: | ||
| 118 | # SOURCES the sources of the library | ||
| 119 | # HEADERS the headers of the library (only for IDE support) | ||
| 120 | # OTHERS other library related files (only for IDE support) | ||
| 121 | # On return: | ||
| 122 | # Library target is defined and added to LIBRARY_FILES | ||
| 123 | function(core_add_addon_library name) | ||
| 124 | get_filename_component(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
| 125 | list(APPEND SOURCES lib${name}.cpp) | ||
| 126 | core_add_shared_library(${name} OUTPUT_DIRECTORY addons/${DIRECTORY}) | ||
| 127 | set_target_properties(${name} PROPERTIES FOLDER addons) | ||
| 128 | target_include_directories(${name} PRIVATE | ||
| 129 | ${CMAKE_CURRENT_SOURCE_DIR} | ||
| 130 | ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi | ||
| 131 | ${CMAKE_SOURCE_DIR}/xbmc) | ||
| 132 | endfunction() | ||
| 133 | |||
| 134 | # Add an dl-loaded shared library | 114 | # Add an dl-loaded shared library |
| 135 | # Arguments: | 115 | # Arguments: |
| 136 | # name name of the library to add | 116 | # name name of the library to add |
| @@ -386,25 +366,6 @@ function(core_require_dep) | |||
| 386 | endforeach() | 366 | endforeach() |
| 387 | endfunction() | 367 | endfunction() |
| 388 | 368 | ||
| 389 | # add required dyloaded dependencies of main application | ||
| 390 | # Arguments: | ||
| 391 | # dep_list One or many dependency specifications (see split_dependency_specification) | ||
| 392 | # for syntax). The dependency name is used uppercased as variable prefix. | ||
| 393 | # On return: | ||
| 394 | # dependency added to ${SYSTEM_INCLUDES}, ${dep}_SONAME is set up | ||
| 395 | function(core_require_dyload_dep) | ||
| 396 | foreach(depspec ${ARGN}) | ||
| 397 | split_dependency_specification(${depspec} dep version) | ||
| 398 | find_package_with_ver(${dep} ${version} REQUIRED) | ||
| 399 | string(TOUPPER ${dep} depup) | ||
| 400 | list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS}) | ||
| 401 | list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS}) | ||
| 402 | find_soname(${depup} REQUIRED) | ||
| 403 | export_dep() | ||
| 404 | set(${depup}_SONAME ${${depup}_SONAME} PARENT_SCOPE) | ||
| 405 | endforeach() | ||
| 406 | endfunction() | ||
| 407 | |||
| 408 | # helper macro for optional deps | 369 | # helper macro for optional deps |
| 409 | macro(setup_enable_switch) | 370 | macro(setup_enable_switch) |
| 410 | string(TOUPPER ${dep} depup) | 371 | string(TOUPPER ${dep} depup) |
| @@ -450,39 +411,6 @@ function(core_optional_dep) | |||
| 450 | set(final_message ${final_message} PARENT_SCOPE) | 411 | set(final_message ${final_message} PARENT_SCOPE) |
| 451 | endfunction() | 412 | endfunction() |
| 452 | 413 | ||
| 453 | # add optional dyloaded dependencies of main application | ||
| 454 | # Arguments: | ||
| 455 | # dep_list One or many dependency specifications (see split_dependency_specification) | ||
| 456 | # for syntax). The dependency name is used uppercased as variable prefix. | ||
| 457 | # On return: | ||
| 458 | # dependency optionally added to ${SYSTEM_INCLUDES}, ${DEP_DEFINES}, ${dep}_SONAME is set up | ||
| 459 | function(core_optional_dyload_dep) | ||
| 460 | foreach(depspec ${ARGN}) | ||
| 461 | set(_required False) | ||
| 462 | split_dependency_specification(${depspec} dep version) | ||
| 463 | setup_enable_switch() | ||
| 464 | if(${enable_switch} STREQUAL AUTO) | ||
| 465 | find_package_with_ver(${dep} ${version}) | ||
| 466 | elseif(${${enable_switch}}) | ||
| 467 | find_package_with_ver(${dep} ${version} REQUIRED) | ||
| 468 | set(_required True) | ||
| 469 | endif() | ||
| 470 | |||
| 471 | if(${depup}_FOUND) | ||
| 472 | list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS}) | ||
| 473 | find_soname(${depup} REQUIRED) | ||
| 474 | list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS}) | ||
| 475 | set(final_message ${final_message} "${depup} enabled: Yes" PARENT_SCOPE) | ||
| 476 | export_dep() | ||
| 477 | set(${depup}_SONAME ${${depup}_SONAME} PARENT_SCOPE) | ||
| 478 | elseif(_required) | ||
| 479 | message(FATAL_ERROR "${depup} enabled but not found") | ||
| 480 | else() | ||
| 481 | set(final_message ${final_message} "${depup} enabled: No" PARENT_SCOPE) | ||
| 482 | endif() | ||
| 483 | endforeach() | ||
| 484 | endfunction() | ||
| 485 | |||
| 486 | function(core_file_read_filtered result filepattern) | 414 | function(core_file_read_filtered result filepattern) |
| 487 | # Reads STRINGS from text files | 415 | # Reads STRINGS from text files |
| 488 | # with comments filtered out | 416 | # with comments filtered out |
