This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.macros
613 lines (512 loc) · 18.3 KB
/
CMakeLists.macros
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# SPDX-License-Identifier: MIT
#
# Copyright (C) 2015-2020 Micron Technology, Inc. All rights reserved.
#
#----------------------------------------------------------------
# Syntax Conventions:
#
# Cmake keywords and vars : uppercase
# mpool global vars : uppercase
# Local vars : lowercase
# Function parameter FOO : param_FOO
#----------------------------------------------------------------
INCLUDE(CMakeParseArguments)
FUNCTION(MY_JOIN output sep)
SET(result "")
SET(esep "") # effective sep is empty at the beginning
FOREACH(arg ${ARGN})
SET(result "${result}${esep}${arg}")
SET(esep "${sep}")
ENDFOREACH()
SET(${output} "${result}" PARENT_SCOPE)
ENDFUNCTION()
#
# Functions that add text to the beginning of each element of a list
#
# The action of each of these is given in terms of their operation on
# the variable foo defined as:
#
# SET( foo /tmp/cat /tmp/dog )
#
#
# MY_ADD_PREFIX(output " -I" ${foo}) ==> ${output}=="-I/tmp/cat; -I/tmp/dog"
#
FUNCTION(MY_ADD_PREFIX output_var text)
SET(result "")
FOREACH(arg ${ARGN})
LIST(APPEND result "${text}${arg}")
ENDFOREACH()
SET(${output_var} "${result}" PARENT_SCOPE)
ENDFUNCTION()
#
# MY_PREPEND_OVER(output " -I" ${foo}) ==> ${output}=="-I/tmp/cat -I/tmp/dog"
#
FUNCTION(MY_PREPEND_OVER output pfx)
SET(result "")
FOREACH(arg ${ARGN})
SET(result "${result}${pfx}${arg}")
ENDFOREACH()
SET(${output} "${result}" PARENT_SCOPE)
ENDFUNCTION()
FUNCTION(MY_ADD_SUFFIX output_var text)
SET(result "")
FOREACH(arg ${ARGN})
LIST(APPEND result "${arg}${text}")
ENDFOREACH()
SET(${output_var} "${result}" PARENT_SCOPE)
ENDFUNCTION()
#----------------------------------------------------------------
# Use mpool_copy_files to copy a set of files from the current src
# dir to the corresponding build output dir:
#
# mpool_copy_files(foobar
# ${CMAKE_CURRENT_BINARY_DIR}
# readme *.txt *.json *.sh doc/*.txt)
#----------------------------------------------------------------
MACRO(mpool_copy_files target_name dst_dir)
ADD_CUSTOM_TARGET(${target_name} ALL)
FOREACH(PATTERN ${ARGN})
FILE(GLOB COPY_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${PATTERN})
FOREACH(filename ${COPY_FILES})
SET(SRC "${CMAKE_CURRENT_SOURCE_DIR}/${filename}")
SET(DST "${dst_dir}/${filename}")
ADD_CUSTOM_COMMAND(
TARGET ${target_name}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SRC} ${DST})
ENDFOREACH()
ENDFOREACH()
ENDMACRO()
#----------------------------------------------------------------
# MPOOL_DOC: Install documentation with no processing
#
# Usage:
#
# MPOOL_DOC(
# NAME foobar
# SRCS foo.c bar.c
# COMPONENT component)
#----------------------------------------------------------------
FUNCTION(MPOOL_DOC)
SET(one_value_opts
NAME # (required) name for collection of object files
COMPONENT # (required) installation component
)
SET(multi_value_opts
SRCS # (required) list of source files
)
CMAKE_PARSE_ARGUMENTS(
param
"" "${one_value_opts}" "${multi_value_opts}"
${ARGN})
IF("${param_NAME}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_DOC: Must set NAME")
ENDIF()
IF("${param_SRCS}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_DOC: Must set SRCS")
ENDIF()
IF("${param_COMPONENT}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_DOC: Must set COMPONENT")
ENDIF()
#
# Docs are unlikely to be private, but for consistency,
# allow that special component here.
#
IF(NOT "${param_COMPONENT}" STREQUAL "private")
INSTALL(
FILES ${param_SRCS}
DESTINATION ${CMAKE_INSTALL_DOCDIR}
COMPONENT ${param_COMPONENT}
)
ENDIF()
ENDFUNCTION()
#----------------------------------------------------------------
# MPOOL_MKDOCS: Install documentation with mkdocs processing.
# Output is an HTML documentation site.
#
# Usage:
#
# MPOOL_MKDOCS(
# NAME foobar
# SRCDIR foo
# OPTIONS mkdocs_opts
# COMPONENT component)
#----------------------------------------------------------------
FUNCTION(MPOOL_MKDOCS)
SET(one_value_opts
NAME # (required) name for document
SRCDIR # (required) directory containing docs and YAML cfg
COMPONENT # (required) installation component
)
SET(multi_value_opts
OPTIONS # (optional) mkdoc options
)
CMAKE_PARSE_ARGUMENTS(
param
"" "${one_value_opts}" "${multi_value_opts}"
${ARGN})
IF("${param_NAME}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_MKDOCS: Must set NAME")
ENDIF()
IF("${param_SRCDIR}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_MKDOCS: Must set SRCDIR")
ENDIF()
IF("${param_COMPONENT}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_MKDOCS: Must set COMPONENT")
ENDIF()
#
# Stage out to the build side of the tree.
#
FILE(COPY ${param_SRCDIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
#
# Set up a target for the above copy.
#
GET_FILENAME_COMPONENT(basename_SRCDIR ${param_SRCDIR} NAME)
SET(BUILD_SRCDIR "${CMAKE_CURRENT_BINARY_DIR}/${basename_SRCDIR}")
ADD_CUSTOM_TARGET(
${param_NAME}-srcs
ALL
DEPENDS ${BUILD_SRCDIR}
)
#
# Generate the website. The outputs are not completely
# deterministic, so we'll depend upon the top index.html and hope
# for the rest as a side-effect.
#
FILE(GLOB mdsrcs ${param_SRCDIR}/docs/*.md)
LIST(APPEND mdsrcs ${param_SRCDIR}/mkdocs.yml)
#
# RHEL vs. FC handles locales differently (of course).
#
IF( "${MPOOL_DISTRO}" STREQUAL "el6" OR "${MPOOL_DISTRO}" STREQUAL "el7" )
SET(MPOOL_LOCALE "en_US.utf-8")
ELSE()
SET(MPOOL_LOCALE "en_US.UTF-8")
ENDIF()
ADD_CUSTOM_COMMAND(
OUTPUT "${BUILD_SRCDIR}/site/index.html"
COMMAND env LC_ALL=${MPOOL_LOCALE} LANG=${MPOOL_LOCALE} mkdocs build ${param_OPTIONS}
DEPENDS ${mdsrcs}
WORKING_DIRECTORY ${BUILD_SRCDIR}
)
ADD_CUSTOM_TARGET(
${param_NAME}-site
ALL
DEPENDS "${BUILD_SRCDIR}/site/index.html"
)
#
# Docs are unlikely to be private, but for consistency,
# allow that special component here.
#
IF(NOT "${param_COMPONENT}" STREQUAL "private")
INSTALL(
DIRECTORY "${BUILD_SRCDIR}/site/"
DESTINATION ${CMAKE_INSTALL_DOCDIR}
COMPONENT ${param_COMPONENT})
ENDIF()
ENDFUNCTION()
#----------------------------------------------------------------
# MPOOL_PANDOC: Install documentation with pandoc processing.
# Output is HTML and PDF as standalone documents.
#
# Usage:
#
# MPOOL_PANDOC(
# NAME foobar
# SRCS foo.md
# STYLESHEET bar.css
# OPTIONS pandoc_opts
# COMPONENT component)
#----------------------------------------------------------------
FUNCTION(MPOOL_PANDOC)
SET(one_value_opts
NAME # (required) name for document
STYLESHEET # (optional) stylesheet for HTML output
OPTIONS # (optional) pandoc options to override defaults
COMPONENT # (required) installation component
)
SET(multi_value_opts
SRCS # (required) list of source files
)
SET(pandoc_common_opts "--toc" "--smart" "-s")
SET(pandoc_pdf_opts "-V" "geometry:margin=1in")
SET(pandoc_pdf_opts "${pandoc_pdf_opts}" "${pandoc_common_opts}")
CMAKE_PARSE_ARGUMENTS(
param
"" "${one_value_opts}" "${multi_value_opts}"
${ARGN})
IF("${param_NAME}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_PANDOC: Must set NAME")
ENDIF()
IF("${param_SRCS}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_PANDOC: Must set SRCS")
ENDIF()
IF(NOT "${param_OPTIONS}" STREQUAL "")
SET(pandoc_html_opts "${param_OPTIONS}")
SET(pandoc_pdf_opts "${param_OPTIONS}")
ENDIF()
IF(NOT "${param_STYLESHEET}" STREQUAL "")
SET(
pandoc_html_opts "${pandoc_html_opts}" "--css" "${param_STYLESHEET}")
SET(
pandoc_html_opts "${pandoc_html_opts}" "${pandoc_common_opts}")
ENDIF()
IF("${param_COMPONENT}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_PANDOC: Must set COMPONENT")
ENDIF()
SET(
pdf_output_file
"${CMAKE_CURRENT_BINARY_DIR}/${param_NAME}.pdf"
)
SET(
html_output_file
"${CMAKE_CURRENT_BINARY_DIR}/${param_NAME}.html"
)
mpool_copy_files(
${param_SRCS}-src
${CMAKE_CURRENT_BINARY_DIR}
${param_SRCS}
)
ADD_CUSTOM_COMMAND(
OUTPUT ${pdf_output_file} ${html_output_file}
COMMAND pandoc ${pandoc_pdf_opts} -o ${pdf_output_file} ${param_SRCS}
COMMAND pandoc ${pandoc_html_opts} -o ${html_output_file} ${param_SRCS}
DEPENDS ${param_SRCS} ${param_STYLESHEET} ${param_SRCS}-src
)
ADD_CUSTOM_TARGET(
${param_NAME}-doc
ALL
DEPENDS ${pdf_output_file} ${html_output_file}
)
#
# Docs are unlikely to be private, but for consistency,
# allow that special component here.
#
IF(NOT "${param_COMPONENT}" STREQUAL "private")
INSTALL(
FILES ${pdf_output_file} ${html_output_file}
DESTINATION ${CMAKE_INSTALL_DOCDIR}
COMPONENT ${param_COMPONENT})
ENDIF()
ENDFUNCTION()
#----------------------------------------------------------------
#
# MPOOL_OBJECT_FILES : Function to build a collection of object files
#
#----------------------------------------------------------------
FUNCTION(MPOOL_OBJECT_FILES)
SET(one_value_opts
NAME # (required) name for collection of object files
)
SET(multi_value_opts
SRCS # (required) list of source files
DEPS # CMake targets that must be built first
CFLAGS # Additional CFLAGS
INCLUDES # Directories to search for #include
)
CMAKE_PARSE_ARGUMENTS(
param
"" "${one_value_opts}" "${multi_value_opts}"
${ARGN})
IF("${param_NAME}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_OBJECT_FILES: Must set NAME")
ENDIF()
IF("${param_SRCS}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_OBJECT_FILES: Must set SRCS")
ENDIF()
IF(NOT "${param_UNPARSED_ARGUMENTS}" STREQUAL "")
MESSAGE(
FATAL_ERROR
"MPOOL_OBJECT_FILES: Unknown args: ${param_UNPARSED_ARGUMENTS}")
ENDIF()
ADD_LIBRARY(${param_NAME} OBJECT ${param_SRCS})
TARGET_INCLUDE_DIRECTORIES(${param_NAME} PRIVATE ${param_INCLUDES})
TARGET_COMPILE_OPTIONS(${param_NAME} PRIVATE ${param_CFLAGS})
IF(NOT "${param_DEPS}" STREQUAL "")
ADD_DEPENDENCIES(${param_NAME} ${param_DEPS})
ENDIF()
ENDFUNCTION()
#----------------------------------------------------------------
#
# MPOOL_LIBRARY : Function to build a static library
#
#----------------------------------------------------------------
FUNCTION(MPOOL_LIBRARY)
SET(one_value_opts
NAME # (required) name for collection of object files
COMPONENT # (optional) installation component
OUTPUT_NAME # (optional) actual name of installed library
)
SET(multi_value_opts
SRCS # (required) list of source or obj files
DEPS # CMake targets that must be built first
CFLAGS # Additional CFLAGS
INCLUDES # Directories to search for #include
LINK_LIBS # Libraries that must be linked along with this lib
)
CMAKE_PARSE_ARGUMENTS(
param
"" "${one_value_opts}" "${multi_value_opts}"
${ARGN})
IF("${param_NAME}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_OBJECT_FILES: Must set NAME")
ENDIF()
# Optional COMPONENT defaults to "devel"
IF("${param_COMPONENT}" STREQUAL "")
SET(param_COMPONENT "devel")
ENDIF()
IF("${param_SRCS}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_OBJECT_FILES: Must set SRCS")
ENDIF()
IF(NOT "${param_UNPARSED_ARGUMENTS}" STREQUAL "")
MESSAGE(
FATAL_ERROR
"MPOOL_OBJECT_FILES: Unknown args: ${param_UNPARSED_ARGUMENTS}")
ENDIF()
ADD_LIBRARY(${param_NAME}-lib STATIC ${param_SRCS})
IF("${param_OUTPUT_NAME}" STREQUAL "")
SET_TARGET_PROPERTIES(${param_NAME}-lib PROPERTIES OUTPUT_NAME ${param_NAME})
ELSE()
SET_TARGET_PROPERTIES(${param_NAME}-lib PROPERTIES OUTPUT_NAME ${param_OUTPUT_NAME})
ENDIF()
TARGET_INCLUDE_DIRECTORIES(${param_NAME}-lib PRIVATE ${param_INCLUDES})
TARGET_COMPILE_OPTIONS(${param_NAME}-lib PRIVATE ${param_CFLAGS})
TARGET_LINK_LIBRARIES(${param_NAME}-lib ${param_LINK_LIBS})
IF(NOT "${param_DEPS}" STREQUAL "")
ADD_DEPENDENCIES(${param_NAME}-lib ${param_DEPS})
ENDIF()
#
# Some libraries are entirely private; e.g., libraries specific to
# the mpool CLI. Do not install them lest CPack find them.
#
IF(NOT "${param_COMPONENT}" STREQUAL "private")
INSTALL(
TARGETS ${param_NAME}-lib
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${param_COMPONENT}
)
ENDIF()
ENDFUNCTION()
#----------------------------------------------------------------
#
# MPOOL_SHARED_LIBRARY : Function to build a shared library
#
#----------------------------------------------------------------
FUNCTION(MPOOL_SHARED_LIBRARY)
SET(one_value_opts
NAME # (required) name for collection of object files
COMPONENT # (optional) installation component
OUTPUT_NAME # (optional) actual name of installed library
)
SET(multi_value_opts
SRCS # (required) list of source or obj files
DEPS # CMake targets that must be built first
CFLAGS # Additional CFLAGS
INCLUDES # Directories to search for #include
LINK_LIBS # Libraries that must be linked along with this lib
)
CMAKE_PARSE_ARGUMENTS(
param
"" "${one_value_opts}" "${multi_value_opts}"
${ARGN})
IF("${param_NAME}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_OBJECT_FILES: Must set NAME")
ENDIF()
# Optional COMPONENT defaults to "runtime"
IF("${param_COMPONENT}" STREQUAL "")
SET(param_COMPONENT "runtime")
ENDIF()
IF("${param_SRCS}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_OBJECT_FILES: Must set SRCS")
ENDIF()
IF(NOT "${param_UNPARSED_ARGUMENTS}" STREQUAL "")
MESSAGE(
FATAL_ERROR
"MPOOL_OBJECT_FILES: Unknown args: ${param_UNPARSED_ARGUMENTS}")
ENDIF()
ADD_LIBRARY(${param_NAME}-solib SHARED ${param_SRCS})
IF("${param_OUTPUT_NAME}" STREQUAL "")
SET_TARGET_PROPERTIES(${param_NAME}-solib PROPERTIES OUTPUT_NAME ${param_NAME})
ELSE()
SET_TARGET_PROPERTIES(${param_NAME}-solib PROPERTIES OUTPUT_NAME ${param_OUTPUT_NAME})
ENDIF()
SET_TARGET_PROPERTIES(${param_NAME}-solib PROPERTIES SOVERSION "1.7")
SET_TARGET_PROPERTIES(${param_NAME}-solib PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/mpool")
TARGET_INCLUDE_DIRECTORIES(${param_NAME}-solib PRIVATE ${param_INCLUDES})
TARGET_COMPILE_OPTIONS(${param_NAME}-solib PRIVATE ${param_CFLAGS})
TARGET_LINK_LIBRARIES(${param_NAME}-solib ${param_LINK_LIBS})
IF(NOT "${param_DEPS}" STREQUAL "")
ADD_DEPENDENCIES(${param_NAME}-solib ${param_DEPS})
ENDIF()
#
# Some libraries are entirely private; e.g., libraries specific to
# the mpool CLI. Do not install them lest CPack find them.
#
IF(NOT "${param_COMPONENT}" STREQUAL "private")
INSTALL(
TARGETS ${param_NAME}-solib
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${param_COMPONENT}
)
ENDIF()
ENDFUNCTION()
#----------------------------------------------------------------
#
# MPOOL_EXECUTABLE : Function to build a binary executable
#
#----------------------------------------------------------------
FUNCTION(MPOOL_EXECUTABLE)
SET(one_value_opts
NAME # (required) name for collection of object files
COMPONENT # (optional) installation component, default "runtime"
)
SET(multi_value_opts
SRCS # (required) list of source or obj files
DEPS # CMake targets that must be built first
CFLAGS # Additional CFLAGS
INCLUDES # Directories to search for #include
LINK_LIBS # Libraries to use when linking
DEP_LIBS # DEPS and LINK_LIBS combined
)
CMAKE_PARSE_ARGUMENTS(
param
"" "${one_value_opts}" "${multi_value_opts}"
${ARGN})
IF("${param_NAME}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_EXECUTABLE: Must set NAME")
ENDIF()
IF("${param_SRCS}" STREQUAL "")
MESSAGE(FATAL_ERROR "MPOOL_EXECUTABLE: Must set SRCS")
ENDIF()
# Optional COMPONENT defaults to "runtime"
IF("${param_COMPONENT}" STREQUAL "")
SET(param_COMPONENT "runtime")
ENDIF()
IF(NOT "${param_UNPARSED_ARGUMENTS}" STREQUAL "")
MESSAGE(
FATAL_ERROR
"MPOOL_EXECUTABLE: Unknown args: ${param_UNPARSED_ARGUMENTS}")
ENDIF()
ADD_EXECUTABLE(${param_NAME}-bin ${param_SRCS})
SET_TARGET_PROPERTIES(${param_NAME}-bin PROPERTIES OUTPUT_NAME ${param_NAME})
SET_TARGET_PROPERTIES(${param_NAME}-bin PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/mpool")
TARGET_INCLUDE_DIRECTORIES(${param_NAME}-bin PRIVATE ${param_INCLUDES})
TARGET_COMPILE_OPTIONS(${param_NAME}-bin PRIVATE ${param_CFLAGS})
IF(NOT "${param_DEPS}" STREQUAL "")
ADD_DEPENDENCIES( ${param_NAME}-bin ${param_DEPS} )
ENDIF()
IF(NOT "${param_LINK_LIBS}" STREQUAL "")
TARGET_LINK_LIBRARIES(${param_NAME}-bin ${param_LINK_LIBS} rt)
ENDIF()
IF(NOT "${param_DEP_LIBS}" STREQUAL "")
ADD_DEPENDENCIES( ${param_NAME}-bin ${param_DEP_LIBS} )
TARGET_LINK_LIBRARIES( ${param_NAME}-bin ${param_DEP_LIBS} rt )
ENDIF()
IF(NOT "${param_COMPONENT}" STREQUAL "private")
INSTALL(
TARGETS ${param_NAME}-bin
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT ${param_COMPONENT})
ENDIF()
ENDFUNCTION()