|
| 1 | +# @file |
| 2 | +# |
| 3 | +# @brief Sets CMake target_sources and target_include_directories |
| 4 | +# |
| 5 | +# --- The Clear BSD License --- |
| 6 | +# Copyright Semtech Corporation 2025. All rights reserved. |
| 7 | +# |
| 8 | +# Redistribution and use in source and binary forms, with or without |
| 9 | +# modification, are permitted (subject to the limitations in the disclaimer |
| 10 | +# below) provided that the following conditions are met: |
| 11 | +# * Redistributions of source code must retain the above copyright |
| 12 | +# notice, this list of conditions and the following disclaimer. |
| 13 | +# * Redistributions in binary form must reproduce the above copyright |
| 14 | +# notice, this list of conditions and the following disclaimer in the |
| 15 | +# documentation and/or other materials provided with the distribution. |
| 16 | +# * Neither the name of the Semtech corporation nor the |
| 17 | +# names of its contributors may be used to endorse or promote products |
| 18 | +# derived from this software without specific prior written permission. |
| 19 | +# |
| 20 | +# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY |
| 21 | +# THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
| 22 | +# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT |
| 23 | +# NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
| 24 | +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE |
| 25 | +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 26 | +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 27 | +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 28 | +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 29 | +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 30 | +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 31 | +# POSSIBILITY OF SUCH DAMAGE. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +set(LIBRARY_SOURCES) |
| 36 | +list(APPEND LIBRARY_SOURCES |
| 37 | + llcc68_driver_version.c |
| 38 | + llcc68.c |
| 39 | +) |
| 40 | + |
| 41 | +add_library(llcc68_driver STATIC ${LIBRARY_SOURCES}) |
| 42 | + |
| 43 | +add_library(llcc68_driver::llcc68_driver ALIAS llcc68_driver) |
| 44 | + |
| 45 | +target_include_directories(llcc68_driver PUBLIC |
| 46 | + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> |
| 47 | + $<INSTALL_INTERFACE:> |
| 48 | +) |
| 49 | + |
| 50 | +install(TARGETS llcc68_driver |
| 51 | + EXPORT Llcc68DriverTargets |
| 52 | + LIBRARY DESTINATION lib |
| 53 | + ARCHIVE DESTINATION lib |
| 54 | + RUNTIME DESTINATION bin |
| 55 | + INCLUDES DESTINATION include |
| 56 | +) |
0 commit comments