mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-20 15:55:45 +01:00
Adds audacity_header_only_library
This commit is contained in:
committed by
Dmitry Vedenko
parent
d28554189d
commit
185d1d5ecc
@@ -509,6 +509,22 @@ macro( audacity_library NAME SOURCES IMPORT_TARGETS
|
|||||||
set( AUDACITY_LIBRARIES "${AUDACITY_LIBRARIES}" PARENT_SCOPE )
|
set( AUDACITY_LIBRARIES "${AUDACITY_LIBRARIES}" PARENT_SCOPE )
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# A special macro for header only libraries
|
||||||
|
|
||||||
|
macro( audacity_header_only_library NAME SOURCES IMPORT_TARGETS
|
||||||
|
ADDITIONAL_DEFINES )
|
||||||
|
# ditto comment in the previous macro
|
||||||
|
add_library( ${NAME} INTERFACE )
|
||||||
|
|
||||||
|
target_include_directories ( ${NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||||
|
target_sources( ${NAME} INTERFACE ${SOURCES})
|
||||||
|
target_link_libraries( ${NAME} INTERFACE ${IMPORT_TARGETS} )
|
||||||
|
target_compile_definitions( ${NAME} INTERFACE ${ADDITIONAL_DEFINES} )
|
||||||
|
|
||||||
|
list( APPEND AUDACITY_LIBRARIES "${NAME}" )
|
||||||
|
set( AUDACITY_LIBRARIES "${AUDACITY_LIBRARIES}" PARENT_SCOPE )
|
||||||
|
endmacro()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add individual library targets
|
# Add individual library targets
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user