mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-08 00:31:11 +00:00
less property dance
This commit is contained in:
parent
66b77bfb6f
commit
21aca082a9
2 changed files with 11 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
macro ( ADD_FLUID_TEST _test )
|
||||
ADD_EXECUTABLE(${_test} ${_test}.c $<TARGET_OBJECTS:libfluidsynth-OBJ> )
|
||||
add_executable( ${_test} ${_test}.c )
|
||||
|
||||
# only build this unit test when explicitly requested by "make check"
|
||||
set_target_properties(${_test} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
@ -8,7 +8,7 @@ macro ( ADD_FLUID_TEST _test )
|
|||
if ( FLUID_CPPFLAGS )
|
||||
set_target_properties ( ${_test} PROPERTIES COMPILE_FLAGS ${FLUID_CPPFLAGS} )
|
||||
endif ( FLUID_CPPFLAGS )
|
||||
TARGET_LINK_LIBRARIES(${_test} $<TARGET_PROPERTY:libfluidsynth-OBJ,INTERFACE_LINK_LIBRARIES>)
|
||||
target_link_libraries( ${_test} libfluidsynth-OBJ )
|
||||
|
||||
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
|
||||
target_include_directories(${_test}
|
||||
|
@ -28,7 +28,7 @@ macro ( ADD_FLUID_TEST _test )
|
|||
endmacro ( ADD_FLUID_TEST )
|
||||
|
||||
macro ( ADD_FLUID_TEST_UTIL _util )
|
||||
ADD_EXECUTABLE(${_util} ${_util}.c $<TARGET_OBJECTS:libfluidsynth-OBJ> )
|
||||
add_executable( ${_util} ${_util}.c )
|
||||
|
||||
# only build this unit test when explicitly requested by "make check"
|
||||
set_target_properties(${_util} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
@ -40,7 +40,7 @@ macro ( ADD_FLUID_TEST_UTIL _util )
|
|||
if ( FLUID_CPPFLAGS )
|
||||
set_target_properties ( ${_util} PROPERTIES COMPILE_FLAGS ${FLUID_CPPFLAGS} )
|
||||
endif ( FLUID_CPPFLAGS )
|
||||
TARGET_LINK_LIBRARIES(${_util} $<TARGET_PROPERTY:libfluidsynth-OBJ,INTERFACE_LINK_LIBRARIES>)
|
||||
target_link_libraries( ${_util} libfluidsynth-OBJ )
|
||||
|
||||
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
|
||||
target_include_directories(${_util}
|
||||
|
|
|
@ -375,9 +375,14 @@ target_link_libraries ( libfluidsynth-OBJ INTERFACE
|
|||
${LIBINSTPATCH_LIBRARIES}
|
||||
)
|
||||
|
||||
# This doesn't install any object file at all
|
||||
# it is only a trick for exporting targets
|
||||
install( TARGETS libfluidsynth-OBJ
|
||||
EXPORT FluidSynthTargets
|
||||
OBJECTS )
|
||||
|
||||
# Here are applied/linked the OBJECT library dependencies
|
||||
get_target_property ( LIBS_PRIVATE libfluidsynth-OBJ INTERFACE_LINK_LIBRARIES)
|
||||
target_link_libraries ( libfluidsynth PRIVATE ${LIBS_PRIVATE} )
|
||||
target_link_libraries ( libfluidsynth PRIVATE libfluidsynth-OBJ )
|
||||
|
||||
# ************ CLI program ************
|
||||
|
||||
|
|
Loading…
Reference in a new issue