DISTRHO Plugin Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

524 lines
17KB

  1. include(CMakeParseArguments)
  2. # ------------------------------------------------------------------------------
  3. # DPF public functions
  4. # ------------------------------------------------------------------------------
  5. # dpf_add_plugin(name <args...>)
  6. # ------------------------------------------------------------------------------
  7. #
  8. # Add a plugin built using the DISTRHO Plugin Framework.
  9. #
  10. # ------------------------------------------------------------------------------
  11. # Created targets:
  12. #
  13. # `<name>`
  14. # static library: the common part of the plugin
  15. # The public properties set on this target apply to both DSP and UI.
  16. #
  17. # `<name>-dsp`
  18. # static library: the DSP part of the plugin
  19. # The public properties set on this target apply to the DSP only.
  20. #
  21. # `<name>-ui`
  22. # static library: the UI part of the plugin
  23. # The public properties set on this target apply to the UI only.
  24. #
  25. # `<name>-<target>` for each target specified with the `TARGETS` argument.
  26. # This is target-dependent and not intended for public use.
  27. #
  28. # ------------------------------------------------------------------------------
  29. # Arguments:
  30. #
  31. # `TARGETS` <tgt1>...<tgtN>
  32. # a list of one of more of the following target types:
  33. # `jack`, `ladspa`, `dssi`, `lv2`, `vst`
  34. #
  35. # `UI_TYPE` <type>
  36. # the user interface type: `opengl` (default), `cairo`
  37. #
  38. # `MONOLITHIC`
  39. # build LV2 as a single binary for UI and DSP
  40. #
  41. # `FILES_DSP` <file1>...<fileN>
  42. # list of sources which are part of the DSP
  43. #
  44. # `FILES_UI` <file1>...<fileN>
  45. # list of sources which are part of the UI
  46. # empty indicates the plugin does not have UI
  47. #
  48. # `FILES_COMMON` <file1>...<fileN>
  49. # list of sources which are part of both DSP and UI
  50. #
  51. function(dpf_add_plugin NAME)
  52. set(options MONOLITHIC)
  53. set(oneValueArgs UI_TYPE)
  54. set(multiValueArgs TARGETS FILES_DSP FILES_UI)
  55. cmake_parse_arguments(_dpf_plugin "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
  56. if("${_dpf_plugin_UI_TYPE}" STREQUAL "")
  57. set(_dpf_plugin_UI_TYPE "opengl")
  58. endif()
  59. set(_dgl_library)
  60. if(_dpf_plugin_FILES_UI)
  61. if(_dpf_plugin_UI_TYPE STREQUAL "cairo")
  62. dpf__add_dgl_cairo()
  63. set(_dgl_library dgl-cairo)
  64. elseif(_dpf_plugin_UI_TYPE STREQUAL "opengl")
  65. dpf__add_dgl_opengl()
  66. set(_dgl_library dgl-opengl)
  67. else()
  68. message(FATAL_ERROR "Unrecognized UI type for plugin: ${_dpf_plugin_UI_TYPE}")
  69. endif()
  70. endif()
  71. ###
  72. dpf__ensure_sources_non_empty(_dpf_plugin_FILES_COMMON)
  73. dpf__ensure_sources_non_empty(_dpf_plugin_FILES_DSP)
  74. dpf__ensure_sources_non_empty(_dpf_plugin_FILES_UI)
  75. ###
  76. dpf__add_static_library("${NAME}" ${_dpf_plugin_FILES_COMMON})
  77. target_include_directories("${NAME}" PUBLIC
  78. "${DPF_ROOT_DIR}/distrho")
  79. if(_dgl_library)
  80. # make sure that all code will see DGL_* definitions
  81. target_link_libraries("${NAME}" PUBLIC "${_dgl_library}-definitions")
  82. endif()
  83. dpf__add_static_library("${NAME}-dsp" ${_dpf_plugin_FILES_DSP})
  84. target_link_libraries("${NAME}-dsp" PUBLIC "${NAME}")
  85. if(_dgl_library)
  86. dpf__add_static_library("${NAME}-ui" ${_dpf_plugin_FILES_UI})
  87. target_link_libraries("${NAME}-ui" PUBLIC "${NAME}" ${_dgl_library})
  88. else()
  89. add_library("${NAME}-ui" INTERFACE)
  90. endif()
  91. ###
  92. foreach(_target ${_dpf_plugin_TARGETS})
  93. if(_target STREQUAL "jack")
  94. dpf__build_jack("${NAME}" "${_dgl_library}")
  95. elseif(_target STREQUAL "ladspa")
  96. dpf__build_ladspa("${NAME}")
  97. elseif(_target STREQUAL "dssi")
  98. dpf__build_dssi("${NAME}" "${_dgl_library}")
  99. elseif(_target STREQUAL "lv2")
  100. dpf__build_lv2("${NAME}" "${_dgl_library}" "${_dpf_plugin_MONOLITHIC}")
  101. elseif(_target STREQUAL "vst")
  102. dpf__build_vst("${NAME}" "${_dgl_library}")
  103. endif()
  104. endforeach()
  105. endfunction()
  106. # ------------------------------------------------------------------------------
  107. # DPF private functions (prefixed with `dpf__`)
  108. # ------------------------------------------------------------------------------
  109. # Note: The $<0:> trick is to prevent MSVC from appending the build type
  110. # to the output directory.
  111. #
  112. # dpf__build_jack
  113. # ------------------------------------------------------------------------------
  114. #
  115. # Add build rules for a JACK program.
  116. #
  117. function(dpf__build_jack NAME DGL_LIBRARY)
  118. find_package(PkgConfig)
  119. pkg_check_modules(JACK "jack")
  120. if(NOT JACK_FOUND)
  121. dpf__warn_once_only(missing_jack
  122. "JACK is not found, skipping the `jack` plugin targets")
  123. return()
  124. endif()
  125. dpf__create_dummy_source_list(_no_srcs)
  126. dpf__add_executable("${NAME}-jack" ${_no_srcs})
  127. dpf__add_plugin_main("${NAME}-jack" "jack")
  128. dpf__add_ui_main("${NAME}-jack" "jack" "${DGL_LIBRARY}")
  129. target_link_libraries("${NAME}-jack" PRIVATE "${NAME}-dsp" "${NAME}-ui")
  130. set_target_properties("${NAME}-jack" PROPERTIES
  131. RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  132. OUTPUT_NAME "${NAME}")
  133. target_include_directories("${NAME}-jack" PRIVATE ${JACK_INCLUDE_DIRS})
  134. target_link_libraries("${NAME}-jack" PRIVATE ${JACK_LIBRARIES})
  135. link_directories(${JACK_LIBRARY_DIRS})
  136. endfunction()
  137. # dpf__build_ladspa
  138. # ------------------------------------------------------------------------------
  139. #
  140. # Add build rules for a DSSI plugin.
  141. #
  142. function(dpf__build_ladspa NAME)
  143. dpf__create_dummy_source_list(_no_srcs)
  144. dpf__add_module("${NAME}-ladspa" ${_no_srcs})
  145. dpf__add_plugin_main("${NAME}-ladspa" "ladspa")
  146. target_link_libraries("${NAME}-ladspa" PRIVATE "${NAME}-dsp")
  147. set_target_properties("${NAME}-ladspa" PROPERTIES
  148. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  149. OUTPUT_NAME "${NAME}-ladspa"
  150. PREFIX "")
  151. endfunction()
  152. # dpf__build_dssi
  153. # ------------------------------------------------------------------------------
  154. #
  155. # Add build rules for a DSSI plugin.
  156. #
  157. function(dpf__build_dssi NAME DGL_LIBRARY)
  158. find_package(PkgConfig)
  159. pkg_check_modules(LIBLO "liblo")
  160. if(NOT LIBLO_FOUND)
  161. dpf__warn_once_only(missing_liblo
  162. "liblo is not found, skipping the `dssi` plugin targets")
  163. return()
  164. endif()
  165. dpf__create_dummy_source_list(_no_srcs)
  166. dpf__add_module("${NAME}-dssi" ${_no_srcs})
  167. dpf__add_plugin_main("${NAME}-dssi" "dssi")
  168. target_link_libraries("${NAME}-dssi" PRIVATE "${NAME}-dsp")
  169. set_target_properties("${NAME}-dssi" PROPERTIES
  170. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  171. OUTPUT_NAME "${NAME}-dssi"
  172. PREFIX "")
  173. if(DGL_LIBRARY)
  174. dpf__add_executable("${NAME}-dssi-ui" ${_no_srcs})
  175. dpf__add_ui_main("${NAME}-dssi-ui" "dssi" "${DGL_LIBRARY}")
  176. target_link_libraries("${NAME}-dssi-ui" PRIVATE "${NAME}-ui")
  177. set_target_properties("${NAME}-dssi-ui" PROPERTIES
  178. RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}-dssi/$<0:>"
  179. OUTPUT_NAME "${NAME}_ui")
  180. target_include_directories("${NAME}-dssi-ui" PRIVATE ${LIBLO_INCLUDE_DIRS})
  181. target_link_libraries("${NAME}-dssi-ui" PRIVATE ${LIBLO_LIBRARIES})
  182. link_directories(${LIBLO_LIBRARY_DIRS})
  183. endif()
  184. endfunction()
  185. # dpf__build_lv2
  186. # ------------------------------------------------------------------------------
  187. #
  188. # Add build rules for a LV2 plugin.
  189. #
  190. function(dpf__build_lv2 NAME DGL_LIBRARY MONOLITHIC)
  191. dpf__create_dummy_source_list(_no_srcs)
  192. dpf__add_module("${NAME}-lv2" ${_no_srcs})
  193. dpf__add_plugin_main("${NAME}-lv2" "lv2")
  194. target_link_libraries("${NAME}-lv2" PRIVATE "${NAME}-dsp")
  195. set_target_properties("${NAME}-lv2" PROPERTIES
  196. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2/$<0:>"
  197. OUTPUT_NAME "${NAME}_dsp"
  198. PREFIX "")
  199. if(DGL_LIBRARY)
  200. if(MONOLITHIC)
  201. dpf__add_ui_main("${NAME}-lv2" "lv2" "${DGL_LIBRARY}")
  202. target_link_libraries("${NAME}-lv2" PRIVATE "${NAME}-ui")
  203. set_target_properties("${NAME}-lv2" PROPERTIES
  204. OUTPUT_NAME "${NAME}")
  205. else()
  206. dpf__add_module("${NAME}-lv2-ui" ${_no_srcs})
  207. dpf__add_ui_main("${NAME}-lv2-ui" "lv2" "${DGL_LIBRARY}")
  208. target_link_libraries("${NAME}-lv2-ui" PRIVATE "${NAME}-ui")
  209. set_target_properties("${NAME}-lv2-ui" PROPERTIES
  210. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2/$<0:>"
  211. OUTPUT_NAME "${NAME}_ui"
  212. PREFIX "")
  213. endif()
  214. endif()
  215. dpf__add_lv2_ttl_generator()
  216. add_dependencies("${NAME}-lv2" lv2_ttl_generator)
  217. add_custom_command(TARGET "${NAME}-lv2" POST_BUILD
  218. COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}
  219. "$<TARGET_FILE:lv2_ttl_generator>"
  220. "$<TARGET_FILE:${NAME}-lv2>"
  221. WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2")
  222. endfunction()
  223. # dpf__build_vst
  224. # ------------------------------------------------------------------------------
  225. #
  226. # Add build rules for a VST plugin.
  227. #
  228. function(dpf__build_vst NAME DGL_LIBRARY)
  229. dpf__create_dummy_source_list(_no_srcs)
  230. dpf__add_module("${NAME}-vst" ${_no_srcs})
  231. dpf__add_plugin_main("${NAME}-vst" "vst")
  232. dpf__add_ui_main("${NAME}-vst" "vst" "${DGL_LIBRARY}")
  233. target_link_libraries("${NAME}-vst" PRIVATE "${NAME}-dsp" "${NAME}-ui")
  234. set_target_properties("${NAME}-vst" PROPERTIES
  235. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  236. OUTPUT_NAME "${NAME}-vst"
  237. PREFIX "")
  238. endfunction()
  239. # dpf__add_dgl_cairo
  240. # ------------------------------------------------------------------------------
  241. #
  242. # Add the Cairo variant of DGL, if not already available.
  243. #
  244. function(dpf__add_dgl_cairo)
  245. if(TARGET dgl-cairo)
  246. return()
  247. endif()
  248. find_package(PkgConfig)
  249. pkg_check_modules(CAIRO "cairo" REQUIRED)
  250. dpf__add_static_library(dgl-cairo EXCLUDE_FROM_ALL
  251. "${DPF_ROOT_DIR}/dgl/src/Application.cpp"
  252. "${DPF_ROOT_DIR}/dgl/src/Color.cpp"
  253. "${DPF_ROOT_DIR}/dgl/src/Geometry.cpp"
  254. "${DPF_ROOT_DIR}/dgl/src/ImageBase.cpp"
  255. "${DPF_ROOT_DIR}/dgl/src/Resources.cpp"
  256. "${DPF_ROOT_DIR}/dgl/src/Widget.cpp"
  257. "${DPF_ROOT_DIR}/dgl/src/Cairo.cpp"
  258. "${DPF_ROOT_DIR}/dgl/src/WidgetPrivateData.cpp")
  259. if(NOT APPLE)
  260. target_sources(dgl-cairo PRIVATE
  261. "${DPF_ROOT_DIR}/dgl/src/Window.cpp")
  262. else()
  263. target_sources(dgl-cairo PRIVATE
  264. "${DPF_ROOT_DIR}/dgl/src/Window.mm")
  265. endif()
  266. target_include_directories(dgl-cairo PUBLIC
  267. "${DPF_ROOT_DIR}/dgl")
  268. dpf__add_dgl_system_libs()
  269. target_link_libraries(dgl-cairo PRIVATE dgl-system-libs)
  270. add_library(dgl-cairo-definitions INTERFACE)
  271. target_compile_definitions(dgl-cairo-definitions INTERFACE "DGL_CAIRO" "HAVE_CAIRO")
  272. target_include_directories(dgl-cairo PUBLIC ${CAIRO_INCLUDE_DIRS})
  273. target_link_libraries(dgl-cairo PRIVATE dgl-cairo-definitions ${CAIRO_LIBRARIES})
  274. link_directories(${CAIRO_LIBRARY_DIRS})
  275. endfunction()
  276. # dpf__add_dgl_opengl
  277. # ------------------------------------------------------------------------------
  278. #
  279. # Add the OpenGL variant of DGL, if not already available.
  280. #
  281. function(dpf__add_dgl_opengl)
  282. if(TARGET dgl-opengl)
  283. return()
  284. endif()
  285. if(NOT OpenGL_GL_PREFERENCE)
  286. set(OpenGL_GL_PREFERENCE "LEGACY")
  287. endif()
  288. find_package(OpenGL REQUIRED)
  289. dpf__add_static_library(dgl-opengl EXCLUDE_FROM_ALL
  290. "${DPF_ROOT_DIR}/dgl/src/Application.cpp"
  291. "${DPF_ROOT_DIR}/dgl/src/Color.cpp"
  292. "${DPF_ROOT_DIR}/dgl/src/Geometry.cpp"
  293. "${DPF_ROOT_DIR}/dgl/src/ImageBase.cpp"
  294. "${DPF_ROOT_DIR}/dgl/src/Resources.cpp"
  295. "${DPF_ROOT_DIR}/dgl/src/Widget.cpp"
  296. "${DPF_ROOT_DIR}/dgl/src/OpenGL.cpp"
  297. "${DPF_ROOT_DIR}/dgl/src/Image.cpp"
  298. "${DPF_ROOT_DIR}/dgl/src/ImageWidgets.cpp"
  299. "${DPF_ROOT_DIR}/dgl/src/NanoVG.cpp"
  300. "${DPF_ROOT_DIR}/dgl/src/WidgetPrivateData.cpp")
  301. if(NOT APPLE)
  302. target_sources(dgl-opengl PRIVATE
  303. "${DPF_ROOT_DIR}/dgl/src/Window.cpp")
  304. else()
  305. target_sources(dgl-opengl PRIVATE
  306. "${DPF_ROOT_DIR}/dgl/src/Window.mm")
  307. endif()
  308. target_include_directories(dgl-opengl PUBLIC
  309. "${DPF_ROOT_DIR}/dgl")
  310. dpf__add_dgl_system_libs()
  311. target_link_libraries(dgl-opengl PRIVATE dgl-system-libs)
  312. add_library(dgl-opengl-definitions INTERFACE)
  313. target_compile_definitions(dgl-opengl-definitions INTERFACE "DGL_OPENGL" "HAVE_OPENGL")
  314. target_include_directories(dgl-opengl PUBLIC "${OPENGL_INCLUDE_DIR}")
  315. target_link_libraries(dgl-opengl PRIVATE dgl-opengl-definitions "${OPENGL_gl_LIBRARY}")
  316. endfunction()
  317. # dpf__add_dgl_system_libs
  318. # ------------------------------------------------------------------------------
  319. #
  320. # Find system libraries required by DGL and add them as an interface target.
  321. #
  322. function(dpf__add_dgl_system_libs)
  323. if(TARGET dgl-system-libs)
  324. return()
  325. endif()
  326. add_library(dgl-system-libs INTERFACE)
  327. if(HAIKU)
  328. target_link_libraries(dgl-system-libs INTERFACE "be")
  329. elseif(WIN32)
  330. target_link_libraries(dgl-system-libs INTERFACE "gdi32" "comdlg32")
  331. elseif(APPLE)
  332. find_library(APPLE_COCOA_FRAMEWORK "Cocoa")
  333. target_link_libraries(dgl-system-libs INTERFACE "${APPLE_COCOA_FRAMEWORK}")
  334. else()
  335. find_package(X11 REQUIRED)
  336. target_include_directories(dgl-system-libs INTERFACE "${X11_INCLUDE_DIR}")
  337. target_link_libraries(dgl-system-libs INTERFACE "${X11_X11_LIB}")
  338. endif()
  339. endfunction()
  340. # dpf__add_executable
  341. # ------------------------------------------------------------------------------
  342. #
  343. # Adds an executable target, and set some default properties on the target.
  344. #
  345. function(dpf__add_executable NAME)
  346. add_executable("${NAME}" ${ARGN})
  347. set_target_properties("${NAME}" PROPERTIES
  348. POSITION_INDEPENDENT_CODE TRUE
  349. C_VISIBILITY_PRESET "hidden"
  350. CXX_VISIBILITY_PRESET "hidden"
  351. VISIBILITY_INLINES_HIDDEN TRUE)
  352. endfunction()
  353. # dpf__add_module
  354. # ------------------------------------------------------------------------------
  355. #
  356. # Adds a module target, and set some default properties on the target.
  357. #
  358. function(dpf__add_module NAME)
  359. add_library("${NAME}" MODULE ${ARGN})
  360. set_target_properties("${NAME}" PROPERTIES
  361. POSITION_INDEPENDENT_CODE TRUE
  362. C_VISIBILITY_PRESET "hidden"
  363. CXX_VISIBILITY_PRESET "hidden"
  364. VISIBILITY_INLINES_HIDDEN TRUE)
  365. if ((NOT WIN32 AND NOT APPLE) OR MINGW)
  366. target_link_libraries("${NAME}" PRIVATE "-Wl,--no-undefined")
  367. endif()
  368. endfunction()
  369. # dpf__add_static_library
  370. # ------------------------------------------------------------------------------
  371. #
  372. # Adds a module target, and set some default properties on the target.
  373. #
  374. function(dpf__add_static_library NAME)
  375. add_library("${NAME}" STATIC ${ARGN})
  376. set_target_properties("${NAME}" PROPERTIES
  377. POSITION_INDEPENDENT_CODE TRUE
  378. C_VISIBILITY_PRESET "hidden"
  379. CXX_VISIBILITY_PRESET "hidden"
  380. VISIBILITY_INLINES_HIDDEN TRUE)
  381. endfunction()
  382. # dpf__add_plugin_main
  383. # ------------------------------------------------------------------------------
  384. #
  385. # Adds plugin code to the given target.
  386. #
  387. function(dpf__add_plugin_main NAME TARGET)
  388. target_sources("${NAME}" PRIVATE
  389. "${DPF_ROOT_DIR}/distrho/DistrhoPluginMain.cpp")
  390. dpf__add_plugin_target_definition("${NAME}" "${TARGET}")
  391. endfunction()
  392. # dpf__add_ui_main
  393. # ------------------------------------------------------------------------------
  394. #
  395. # Adds UI code to the given target (only if the target has UI).
  396. #
  397. function(dpf__add_ui_main NAME TARGET HAS_UI)
  398. if(HAS_UI)
  399. target_sources("${NAME}" PRIVATE
  400. "${DPF_ROOT_DIR}/distrho/DistrhoUIMain.cpp")
  401. dpf__add_plugin_target_definition("${NAME}" "${TARGET}")
  402. endif()
  403. endfunction()
  404. # dpf__add_plugin_target_definition
  405. # ------------------------------------------------------------------------------
  406. #
  407. # Adds the plugins target macro definition.
  408. # This selects which entry file is compiled according to the target type.
  409. #
  410. function(dpf__add_plugin_target_definition NAME TARGET)
  411. string(TOUPPER "${TARGET}" _upperTarget)
  412. target_compile_definitions("${NAME}" PRIVATE "DISTRHO_PLUGIN_TARGET_${_upperTarget}")
  413. endfunction()
  414. # dpf__add_lv2_ttl_generator
  415. # ------------------------------------------------------------------------------
  416. #
  417. # Build the LV2 TTL generator.
  418. #
  419. function(dpf__add_lv2_ttl_generator)
  420. if(TARGET lv2_ttl_generator)
  421. return()
  422. endif()
  423. add_executable(lv2_ttl_generator "${DPF_ROOT_DIR}/utils/lv2-ttl-generator/lv2_ttl_generator.c")
  424. if(NOT WINDOWS AND NOT APPLE AND NOT HAIKU)
  425. target_link_libraries(lv2_ttl_generator "dl")
  426. endif()
  427. endfunction()
  428. # dpf__ensure_sources_non_empty
  429. # ------------------------------------------------------------------------------
  430. #
  431. # Ensure the given source list contains at least one file.
  432. # The function appends an empty source file to the list if necessary.
  433. # This is useful when CMake does not permit to add targets without sources.
  434. #
  435. function(dpf__ensure_sources_non_empty VAR)
  436. if(NOT "" STREQUAL "${${VAR}}")
  437. return()
  438. endif()
  439. set(_file "${CMAKE_CURRENT_BINARY_DIR}/_dpf_empty.c")
  440. if(NOT EXISTS "${_file}")
  441. file(WRITE "${_file}" "")
  442. endif()
  443. set("${VAR}" "${_file}" PARENT_SCOPE)
  444. endfunction()
  445. # dpf__create_dummy_source_list
  446. # ------------------------------------------------------------------------------
  447. #
  448. # Create a dummy source list which is equivalent to compiling nothing.
  449. # This is only for compatibility with older CMake versions, which refuse to add
  450. # targets without any sources.
  451. #
  452. macro(dpf__create_dummy_source_list VAR)
  453. set("${VAR}")
  454. if(CMAKE_VERSION VERSION_LESS "3.11")
  455. dpf__ensure_sources_non_empty("${VAR}")
  456. endif()
  457. endmacro()
  458. # dpf__warn_once
  459. # ------------------------------------------------------------------------------
  460. #
  461. # Prints a warning message once only.
  462. #
  463. function(dpf__warn_once_only TOKEN MESSAGE)
  464. get_property(_warned GLOBAL PROPERTY "dpf__have_warned_${TOKEN}")
  465. if(NOT _warned)
  466. set_property(GLOBAL PROPERTY "dpf__have_warned_${TOKEN}" TRUE)
  467. message(WARNING "${MESSAGE}")
  468. endif()
  469. endfunction()