mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-21 03:45:42 +02:00
particles: cmake: compact CMakeLists.txt by using foreach()
This commit is contained in:
parent
c6ce536cff
commit
c6b83ac7dc
1 changed files with 8 additions and 27 deletions
|
@ -4,38 +4,19 @@ add_library(particle-sdk INTERFACE)
|
||||||
target_compile_options(particle-sdk INTERFACE ${CAIRO_CFLAGS_OTHER})
|
target_compile_options(particle-sdk INTERFACE ${CAIRO_CFLAGS_OTHER})
|
||||||
target_include_directories(particle-sdk INTERFACE ${CAIRO_INCLUDE_DIRS})
|
target_include_directories(particle-sdk INTERFACE ${CAIRO_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
# Only an exposable, not a particle. Used by a couple of modules
|
||||||
add_library(dynlist SHARED dynlist.c dynlist.h)
|
add_library(dynlist SHARED dynlist.c dynlist.h)
|
||||||
target_link_libraries(dynlist PRIVATE particle-sdk)
|
target_link_libraries(dynlist PRIVATE particle-sdk)
|
||||||
|
|
||||||
set(CMAKE_SHARED_MODULE_PREFIX particle_)
|
set(CMAKE_SHARED_MODULE_PREFIX particle_)
|
||||||
|
|
||||||
add_library(empty MODULE empty.c)
|
set(particles empty list map progress-bar ramp string)
|
||||||
target_link_libraries(empty particle-sdk)
|
|
||||||
|
|
||||||
add_library(list MODULE list.c)
|
foreach (particle ${particles})
|
||||||
target_link_libraries(list particle-sdk)
|
add_library(${particle} MODULE ${particle}.c)
|
||||||
|
target_link_libraries(${particle} particle-sdk)
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
add_library(map MODULE map.c)
|
target_link_libraries(string ${CAIRO_LIBRARIES})
|
||||||
target_link_libraries(map particle-sdk)
|
|
||||||
|
|
||||||
add_library(progress-bar MODULE progress-bar.c)
|
install(TARGETS ${particles} dynlist DESTINATION lib/f00bar)
|
||||||
target_link_libraries(progress-bar particle-sdk)
|
|
||||||
|
|
||||||
add_library(ramp MODULE ramp.c)
|
|
||||||
target_link_libraries(ramp particle-sdk)
|
|
||||||
|
|
||||||
add_library(string MODULE string.c)
|
|
||||||
target_link_libraries(string particle-sdk ${CAIRO_LIBRARIES})
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS
|
|
||||||
empty
|
|
||||||
list
|
|
||||||
map
|
|
||||||
progress-bar
|
|
||||||
ramp
|
|
||||||
string
|
|
||||||
|
|
||||||
dynlist
|
|
||||||
|
|
||||||
DESTINATION lib/f00bar)
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue