CMakeLists.txt: limit libraries linked to by ${PROJECT_NAME}
Old behaviour was linking to all components, but main.c currently only needs a few of them.
This commit is contained in:
parent
a826c2364d
commit
5794dbf403
|
@ -69,11 +69,12 @@ set(interfaces
|
|||
)
|
||||
|
||||
target_compile_options(${PROJECT_NAME} PUBLIC ${cflags})
|
||||
# Dependencies for main.c
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE system game)
|
||||
|
||||
foreach(c ${components})
|
||||
add_subdirectory("src/${c}")
|
||||
target_compile_options(${c} PUBLIC ${cflags})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${c})
|
||||
endforeach()
|
||||
|
||||
foreach(i ${interfaces})
|
||||
|
|
Loading…
Reference in New Issue