2024-06-18 13:14:35 +03:00
|
|
|
set(USERSPACE_LIBRARIES
|
|
|
|
LibC
|
|
|
|
LibELF
|
|
|
|
LibFont
|
|
|
|
LibGUI
|
|
|
|
LibImage
|
|
|
|
LibInput
|
|
|
|
)
|
|
|
|
|
2024-06-19 04:20:23 +03:00
|
|
|
foreach(library ${USERSPACE_LIBRARIES})
|
|
|
|
add_subdirectory(${library})
|
2024-06-18 13:14:35 +03:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_custom_target(libraries)
|
|
|
|
|
2024-06-19 04:20:23 +03:00
|
|
|
foreach(library ${USERSPACE_LIBRARIES})
|
|
|
|
string(TOLOWER ${library} library_lower)
|
2024-09-02 21:25:00 +03:00
|
|
|
if (TARGET ${library_lower} AND NOT ${library_lower} STREQUAL "libc")
|
2024-06-19 04:20:23 +03:00
|
|
|
add_dependencies(libraries ${library_lower})
|
2024-06-18 13:14:35 +03:00
|
|
|
# This is to allow cmake to link when libc updates
|
2024-06-19 04:20:23 +03:00
|
|
|
target_link_options(${library_lower} PRIVATE -nolibc)
|
2024-09-20 20:04:49 +03:00
|
|
|
# Default compile options
|
2024-09-26 15:20:07 +03:00
|
|
|
target_compile_options(${library_lower} PRIVATE -g -O2 -Wall -Wextra -Werror)
|
2024-06-18 13:14:35 +03:00
|
|
|
endif()
|
|
|
|
endforeach()
|