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.

526 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. else()
  104. message(FATAL_ERROR "Unrecognized target type for plugin: ${_target}")
  105. endif()
  106. endforeach()
  107. endfunction()
  108. # ------------------------------------------------------------------------------
  109. # DPF private functions (prefixed with `dpf__`)
  110. # ------------------------------------------------------------------------------
  111. # Note: The $<0:> trick is to prevent MSVC from appending the build type
  112. # to the output directory.
  113. #
  114. # dpf__build_jack
  115. # ------------------------------------------------------------------------------
  116. #
  117. # Add build rules for a JACK program.
  118. #
  119. function(dpf__build_jack NAME DGL_LIBRARY)
  120. find_package(PkgConfig)
  121. pkg_check_modules(JACK "jack")
  122. if(NOT JACK_FOUND)
  123. dpf__warn_once_only(missing_jack
  124. "JACK is not found, skipping the `jack` plugin targets")
  125. return()
  126. endif()
  127. dpf__create_dummy_source_list(_no_srcs)
  128. dpf__add_executable("${NAME}-jack" ${_no_srcs})
  129. dpf__add_plugin_main("${NAME}-jack" "jack")
  130. dpf__add_ui_main("${NAME}-jack" "jack" "${DGL_LIBRARY}")
  131. target_link_libraries("${NAME}-jack" PRIVATE "${NAME}-dsp" "${NAME}-ui")
  132. set_target_properties("${NAME}-jack" PROPERTIES
  133. RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  134. OUTPUT_NAME "${NAME}")
  135. target_include_directories("${NAME}-jack" PRIVATE ${JACK_INCLUDE_DIRS})
  136. target_link_libraries("${NAME}-jack" PRIVATE ${JACK_LIBRARIES})
  137. link_directories(${JACK_LIBRARY_DIRS})
  138. endfunction()
  139. # dpf__build_ladspa
  140. # ------------------------------------------------------------------------------
  141. #
  142. # Add build rules for a DSSI plugin.
  143. #
  144. function(dpf__build_ladspa NAME)
  145. dpf__create_dummy_source_list(_no_srcs)
  146. dpf__add_module("${NAME}-ladspa" ${_no_srcs})
  147. dpf__add_plugin_main("${NAME}-ladspa" "ladspa")
  148. target_link_libraries("${NAME}-ladspa" PRIVATE "${NAME}-dsp")
  149. set_target_properties("${NAME}-ladspa" PROPERTIES
  150. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  151. OUTPUT_NAME "${NAME}-ladspa"
  152. PREFIX "")
  153. endfunction()
  154. # dpf__build_dssi
  155. # ------------------------------------------------------------------------------
  156. #
  157. # Add build rules for a DSSI plugin.
  158. #
  159. function(dpf__build_dssi NAME DGL_LIBRARY)
  160. find_package(PkgConfig)
  161. pkg_check_modules(LIBLO "liblo")
  162. if(NOT LIBLO_FOUND)
  163. dpf__warn_once_only(missing_liblo
  164. "liblo is not found, skipping the `dssi` plugin targets")
  165. return()
  166. endif()
  167. dpf__create_dummy_source_list(_no_srcs)
  168. dpf__add_module("${NAME}-dssi" ${_no_srcs})
  169. dpf__add_plugin_main("${NAME}-dssi" "dssi")
  170. target_link_libraries("${NAME}-dssi" PRIVATE "${NAME}-dsp")
  171. set_target_properties("${NAME}-dssi" PROPERTIES
  172. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  173. OUTPUT_NAME "${NAME}-dssi"
  174. PREFIX "")
  175. if(DGL_LIBRARY)
  176. dpf__add_executable("${NAME}-dssi-ui" ${_no_srcs})
  177. dpf__add_ui_main("${NAME}-dssi-ui" "dssi" "${DGL_LIBRARY}")
  178. target_link_libraries("${NAME}-dssi-ui" PRIVATE "${NAME}-ui")
  179. set_target_properties("${NAME}-dssi-ui" PROPERTIES
  180. RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}-dssi/$<0:>"
  181. OUTPUT_NAME "${NAME}_ui")
  182. target_include_directories("${NAME}-dssi-ui" PRIVATE ${LIBLO_INCLUDE_DIRS})
  183. target_link_libraries("${NAME}-dssi-ui" PRIVATE ${LIBLO_LIBRARIES})
  184. link_directories(${LIBLO_LIBRARY_DIRS})
  185. endif()
  186. endfunction()
  187. # dpf__build_lv2
  188. # ------------------------------------------------------------------------------
  189. #
  190. # Add build rules for a LV2 plugin.
  191. #
  192. function(dpf__build_lv2 NAME DGL_LIBRARY MONOLITHIC)
  193. dpf__create_dummy_source_list(_no_srcs)
  194. dpf__add_module("${NAME}-lv2" ${_no_srcs})
  195. dpf__add_plugin_main("${NAME}-lv2" "lv2")
  196. target_link_libraries("${NAME}-lv2" PRIVATE "${NAME}-dsp")
  197. set_target_properties("${NAME}-lv2" PROPERTIES
  198. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2/$<0:>"
  199. OUTPUT_NAME "${NAME}_dsp"
  200. PREFIX "")
  201. if(DGL_LIBRARY)
  202. if(MONOLITHIC)
  203. dpf__add_ui_main("${NAME}-lv2" "lv2" "${DGL_LIBRARY}")
  204. target_link_libraries("${NAME}-lv2" PRIVATE "${NAME}-ui")
  205. set_target_properties("${NAME}-lv2" PROPERTIES
  206. OUTPUT_NAME "${NAME}")
  207. else()
  208. dpf__add_module("${NAME}-lv2-ui" ${_no_srcs})
  209. dpf__add_ui_main("${NAME}-lv2-ui" "lv2" "${DGL_LIBRARY}")
  210. target_link_libraries("${NAME}-lv2-ui" PRIVATE "${NAME}-ui")
  211. set_target_properties("${NAME}-lv2-ui" PROPERTIES
  212. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2/$<0:>"
  213. OUTPUT_NAME "${NAME}_ui"
  214. PREFIX "")
  215. endif()
  216. endif()
  217. dpf__add_lv2_ttl_generator()
  218. add_dependencies("${NAME}-lv2" lv2_ttl_generator)
  219. add_custom_command(TARGET "${NAME}-lv2" POST_BUILD
  220. COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}
  221. "$<TARGET_FILE:lv2_ttl_generator>"
  222. "$<TARGET_FILE:${NAME}-lv2>"
  223. WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2")
  224. endfunction()
  225. # dpf__build_vst
  226. # ------------------------------------------------------------------------------
  227. #
  228. # Add build rules for a VST plugin.
  229. #
  230. function(dpf__build_vst NAME DGL_LIBRARY)
  231. dpf__create_dummy_source_list(_no_srcs)
  232. dpf__add_module("${NAME}-vst" ${_no_srcs})
  233. dpf__add_plugin_main("${NAME}-vst" "vst")
  234. dpf__add_ui_main("${NAME}-vst" "vst" "${DGL_LIBRARY}")
  235. target_link_libraries("${NAME}-vst" PRIVATE "${NAME}-dsp" "${NAME}-ui")
  236. set_target_properties("${NAME}-vst" PROPERTIES
  237. LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
  238. OUTPUT_NAME "${NAME}-vst"
  239. PREFIX "")
  240. endfunction()
  241. # dpf__add_dgl_cairo
  242. # ------------------------------------------------------------------------------
  243. #
  244. # Add the Cairo variant of DGL, if not already available.
  245. #
  246. function(dpf__add_dgl_cairo)
  247. if(TARGET dgl-cairo)
  248. return()
  249. endif()
  250. find_package(PkgConfig)
  251. pkg_check_modules(CAIRO "cairo" REQUIRED)
  252. dpf__add_static_library(dgl-cairo STATIC
  253. "${DPF_ROOT_DIR}/dgl/src/Application.cpp"
  254. "${DPF_ROOT_DIR}/dgl/src/Color.cpp"
  255. "${DPF_ROOT_DIR}/dgl/src/Geometry.cpp"
  256. "${DPF_ROOT_DIR}/dgl/src/ImageBase.cpp"
  257. "${DPF_ROOT_DIR}/dgl/src/Resources.cpp"
  258. "${DPF_ROOT_DIR}/dgl/src/Widget.cpp"
  259. "${DPF_ROOT_DIR}/dgl/src/Cairo.cpp"
  260. "${DPF_ROOT_DIR}/dgl/src/WidgetPrivateData.cpp")
  261. if(NOT APPLE)
  262. target_sources(dgl-cairo PRIVATE
  263. "${DPF_ROOT_DIR}/dgl/src/Window.cpp")
  264. else()
  265. target_sources(dgl-cairo PRIVATE
  266. "${DPF_ROOT_DIR}/dgl/src/Window.mm")
  267. endif()
  268. target_include_directories(dgl-cairo PUBLIC
  269. "${DPF_ROOT_DIR}/dgl")
  270. dpf__add_dgl_system_libs()
  271. target_link_libraries(dgl-cairo PRIVATE dgl-system-libs)
  272. add_library(dgl-cairo-definitions INTERFACE)
  273. target_compile_definitions(dgl-cairo-definitions INTERFACE "DGL_CAIRO" "HAVE_CAIRO")
  274. target_include_directories(dgl-cairo PUBLIC ${CAIRO_INCLUDE_DIRS})
  275. target_link_libraries(dgl-cairo PRIVATE dgl-cairo-definitions ${CAIRO_LIBRARIES})
  276. link_directories(${CAIRO_LIBRARY_DIRS})
  277. endfunction()
  278. # dpf__add_dgl_opengl
  279. # ------------------------------------------------------------------------------
  280. #
  281. # Add the OpenGL variant of DGL, if not already available.
  282. #
  283. function(dpf__add_dgl_opengl)
  284. if(TARGET dgl-opengl)
  285. return()
  286. endif()
  287. if(NOT OpenGL_GL_PREFERENCE)
  288. set(OpenGL_GL_PREFERENCE "LEGACY")
  289. endif()
  290. find_package(OpenGL REQUIRED)
  291. dpf__add_static_library(dgl-opengl STATIC
  292. "${DPF_ROOT_DIR}/dgl/src/Application.cpp"
  293. "${DPF_ROOT_DIR}/dgl/src/Color.cpp"
  294. "${DPF_ROOT_DIR}/dgl/src/Geometry.cpp"
  295. "${DPF_ROOT_DIR}/dgl/src/ImageBase.cpp"
  296. "${DPF_ROOT_DIR}/dgl/src/Resources.cpp"
  297. "${DPF_ROOT_DIR}/dgl/src/Widget.cpp"
  298. "${DPF_ROOT_DIR}/dgl/src/OpenGL.cpp"
  299. "${DPF_ROOT_DIR}/dgl/src/Image.cpp"
  300. "${DPF_ROOT_DIR}/dgl/src/ImageWidgets.cpp"
  301. "${DPF_ROOT_DIR}/dgl/src/NanoVG.cpp"
  302. "${DPF_ROOT_DIR}/dgl/src/WidgetPrivateData.cpp")
  303. if(NOT APPLE)
  304. target_sources(dgl-opengl PRIVATE
  305. "${DPF_ROOT_DIR}/dgl/src/Window.cpp")
  306. else()
  307. target_sources(dgl-opengl PRIVATE
  308. "${DPF_ROOT_DIR}/dgl/src/Window.mm")
  309. endif()
  310. target_include_directories(dgl-opengl PUBLIC
  311. "${DPF_ROOT_DIR}/dgl")
  312. dpf__add_dgl_system_libs()
  313. target_link_libraries(dgl-opengl PRIVATE dgl-system-libs)
  314. add_library(dgl-opengl-definitions INTERFACE)
  315. target_compile_definitions(dgl-opengl-definitions INTERFACE "DGL_OPENGL" "HAVE_OPENGL")
  316. target_include_directories(dgl-opengl PUBLIC "${OPENGL_INCLUDE_DIR}")
  317. target_link_libraries(dgl-opengl PRIVATE dgl-opengl-definitions "${OPENGL_gl_LIBRARY}")
  318. endfunction()
  319. # dpf__add_dgl_system_libs
  320. # ------------------------------------------------------------------------------
  321. #
  322. # Find system libraries required by DGL and add them as an interface target.
  323. #
  324. function(dpf__add_dgl_system_libs)
  325. if(TARGET dgl-system-libs)
  326. return()
  327. endif()
  328. add_library(dgl-system-libs INTERFACE)
  329. if(HAIKU)
  330. target_link_libraries(dgl-system-libs INTERFACE "be")
  331. elseif(WIN32)
  332. target_link_libraries(dgl-system-libs INTERFACE "gdi32" "comdlg32")
  333. elseif(APPLE)
  334. find_library(APPLE_COCOA_FRAMEWORK "Cocoa")
  335. target_link_libraries(dgl-system-libs INTERFACE "${APPLE_COCOA_FRAMEWORK}")
  336. else()
  337. find_package(X11 REQUIRED)
  338. target_include_directories(dgl-system-libs INTERFACE "${X11_INCLUDE_DIR}")
  339. target_link_libraries(dgl-system-libs INTERFACE "${X11_X11_LIB}")
  340. endif()
  341. endfunction()
  342. # dpf__add_executable
  343. # ------------------------------------------------------------------------------
  344. #
  345. # Adds an executable target, and set some default properties on the target.
  346. #
  347. function(dpf__add_executable NAME)
  348. add_executable("${NAME}" ${ARGN})
  349. set_target_properties("${NAME}" PROPERTIES
  350. POSITION_INDEPENDENT_CODE TRUE
  351. C_VISIBILITY_PRESET "hidden"
  352. CXX_VISIBILITY_PRESET "hidden"
  353. VISIBILITY_INLINES_HIDDEN TRUE)
  354. endfunction()
  355. # dpf__add_module
  356. # ------------------------------------------------------------------------------
  357. #
  358. # Adds a module target, and set some default properties on the target.
  359. #
  360. function(dpf__add_module NAME)
  361. add_library("${NAME}" MODULE ${ARGN})
  362. set_target_properties("${NAME}" PROPERTIES
  363. POSITION_INDEPENDENT_CODE TRUE
  364. C_VISIBILITY_PRESET "hidden"
  365. CXX_VISIBILITY_PRESET "hidden"
  366. VISIBILITY_INLINES_HIDDEN TRUE)
  367. if ((NOT WIN32 AND NOT APPLE) OR MINGW)
  368. target_link_libraries("${NAME}" PRIVATE "-Wl,--no-undefined")
  369. endif()
  370. endfunction()
  371. # dpf__add_static_library
  372. # ------------------------------------------------------------------------------
  373. #
  374. # Adds a static library target, and set some default properties on the target.
  375. #
  376. function(dpf__add_static_library NAME)
  377. add_library("${NAME}" STATIC ${ARGN})
  378. set_target_properties("${NAME}" PROPERTIES
  379. POSITION_INDEPENDENT_CODE TRUE
  380. C_VISIBILITY_PRESET "hidden"
  381. CXX_VISIBILITY_PRESET "hidden"
  382. VISIBILITY_INLINES_HIDDEN TRUE)
  383. endfunction()
  384. # dpf__add_plugin_main
  385. # ------------------------------------------------------------------------------
  386. #
  387. # Adds plugin code to the given target.
  388. #
  389. function(dpf__add_plugin_main NAME TARGET)
  390. target_sources("${NAME}" PRIVATE
  391. "${DPF_ROOT_DIR}/distrho/DistrhoPluginMain.cpp")
  392. dpf__add_plugin_target_definition("${NAME}" "${TARGET}")
  393. endfunction()
  394. # dpf__add_ui_main
  395. # ------------------------------------------------------------------------------
  396. #
  397. # Adds UI code to the given target (only if the target has UI).
  398. #
  399. function(dpf__add_ui_main NAME TARGET HAS_UI)
  400. if(HAS_UI)
  401. target_sources("${NAME}" PRIVATE
  402. "${DPF_ROOT_DIR}/distrho/DistrhoUIMain.cpp")
  403. dpf__add_plugin_target_definition("${NAME}" "${TARGET}")
  404. endif()
  405. endfunction()
  406. # dpf__add_plugin_target_definition
  407. # ------------------------------------------------------------------------------
  408. #
  409. # Adds the plugins target macro definition.
  410. # This selects which entry file is compiled according to the target type.
  411. #
  412. function(dpf__add_plugin_target_definition NAME TARGET)
  413. string(TOUPPER "${TARGET}" _upperTarget)
  414. target_compile_definitions("${NAME}" PRIVATE "DISTRHO_PLUGIN_TARGET_${_upperTarget}")
  415. endfunction()
  416. # dpf__add_lv2_ttl_generator
  417. # ------------------------------------------------------------------------------
  418. #
  419. # Build the LV2 TTL generator.
  420. #
  421. function(dpf__add_lv2_ttl_generator)
  422. if(TARGET lv2_ttl_generator)
  423. return()
  424. endif()
  425. add_executable(lv2_ttl_generator "${DPF_ROOT_DIR}/utils/lv2-ttl-generator/lv2_ttl_generator.c")
  426. if(NOT WINDOWS AND NOT APPLE AND NOT HAIKU)
  427. target_link_libraries(lv2_ttl_generator "dl")
  428. endif()
  429. endfunction()
  430. # dpf__ensure_sources_non_empty
  431. # ------------------------------------------------------------------------------
  432. #
  433. # Ensure the given source list contains at least one file.
  434. # The function appends an empty source file to the list if necessary.
  435. # This is useful when CMake does not permit to add targets without sources.
  436. #
  437. function(dpf__ensure_sources_non_empty VAR)
  438. if(NOT "" STREQUAL "${${VAR}}")
  439. return()
  440. endif()
  441. set(_file "${CMAKE_CURRENT_BINARY_DIR}/_dpf_empty.c")
  442. if(NOT EXISTS "${_file}")
  443. file(WRITE "${_file}" "")
  444. endif()
  445. set("${VAR}" "${_file}" PARENT_SCOPE)
  446. endfunction()
  447. # dpf__create_dummy_source_list
  448. # ------------------------------------------------------------------------------
  449. #
  450. # Create a dummy source list which is equivalent to compiling nothing.
  451. # This is only for compatibility with older CMake versions, which refuse to add
  452. # targets without any sources.
  453. #
  454. macro(dpf__create_dummy_source_list VAR)
  455. set("${VAR}")
  456. if(CMAKE_VERSION VERSION_LESS "3.11")
  457. dpf__ensure_sources_non_empty("${VAR}")
  458. endif()
  459. endmacro()
  460. # dpf__warn_once
  461. # ------------------------------------------------------------------------------
  462. #
  463. # Prints a warning message once only.
  464. #
  465. function(dpf__warn_once_only TOKEN MESSAGE)
  466. get_property(_warned GLOBAL PROPERTY "dpf__have_warned_${TOKEN}")
  467. if(NOT _warned)
  468. set_property(GLOBAL PROPERTY "dpf__have_warned_${TOKEN}" TRUE)
  469. message(WARNING "${MESSAGE}")
  470. endif()
  471. endfunction()