LibC: Compile both static and shared version of LibC
libc target is now set as an alias for libc-static
This commit is contained in:
parent
5f92807fdd
commit
35743cc8e6
|
@ -72,16 +72,19 @@ banan_include_headers(objlibc kernel)
|
||||||
|
|
||||||
banan_install_headers(objlibc)
|
banan_install_headers(objlibc)
|
||||||
|
|
||||||
add_library(libc STATIC $<TARGET_OBJECTS:objlibc>)
|
add_library(libc-static STATIC $<TARGET_OBJECTS:objlibc>)
|
||||||
add_library(libc-shared SHARED $<TARGET_OBJECTS:objlibc>)
|
add_library(libc-shared SHARED $<TARGET_OBJECTS:objlibc>)
|
||||||
|
|
||||||
target_link_options(libc PRIVATE -nolibc)
|
target_link_options(libc-static PRIVATE -nolibc)
|
||||||
target_link_options(libc-shared PRIVATE -nolibc)
|
target_link_options(libc-shared PRIVATE -nolibc)
|
||||||
|
|
||||||
install(TARGETS libc OPTIONAL)
|
install(TARGETS libc-static OPTIONAL)
|
||||||
install(TARGETS libc-shared OPTIONAL)
|
install(TARGETS libc-shared OPTIONAL)
|
||||||
|
|
||||||
|
set_target_properties(libc-static PROPERTIES OUTPUT_NAME libc)
|
||||||
set_target_properties(libc-shared PROPERTIES OUTPUT_NAME libc)
|
set_target_properties(libc-shared PROPERTIES OUTPUT_NAME libc)
|
||||||
|
|
||||||
|
add_library(libc ALIAS libc-static)
|
||||||
|
|
||||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||||
|
|
Loading…
Reference in New Issue