BuildSystem: Cleanup cmake files
This commit is contained in:
parent
0bb44d7b75
commit
f30947336a
|
@ -6,7 +6,10 @@ set(BAN_SOURCES
|
|||
)
|
||||
|
||||
add_library(ban ${BAN_SOURCES})
|
||||
target_link_options(ban PRIVATE -nolibc)
|
||||
banan_link_library(ban libc)
|
||||
|
||||
set_target_properties(ban PROPERTIES OUTPUT_NAME libban)
|
||||
|
||||
banan_install_headers(ban)
|
||||
install(TARGETS ban OPTIONAL)
|
||||
|
|
|
@ -25,6 +25,9 @@ set(CMAKE_INSTALL_SYSCONF ${BANAN_ETC})
|
|||
set(CMAKE_INSTALL_MESSAGE NEVER)
|
||||
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY True)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
|
||||
|
|
|
@ -191,12 +191,12 @@ target_compile_options(kernel PRIVATE
|
|||
-Wall -Wextra -Werror -Wstack-usage=1024
|
||||
)
|
||||
|
||||
# This might not work with other toolchains
|
||||
target_compile_options(kernel PRIVATE $<$<COMPILE_LANGUAGE:CXX>:
|
||||
# C++ specific
|
||||
target_compile_options(kernel PRIVATE
|
||||
-Wno-literal-suffix
|
||||
-Wno-invalid-offsetof
|
||||
-fno-rtti
|
||||
-fno-exceptions>
|
||||
-fno-exceptions
|
||||
)
|
||||
|
||||
if(ENABLE_KERNEL_UBSAN)
|
||||
|
@ -213,8 +213,9 @@ endif()
|
|||
|
||||
target_link_options(kernel PRIVATE -ffreestanding -nostdlib -orphan-handling=error)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-file-name=crtbegin.o OUTPUT_VARIABLE CRTBEGIN OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-file-name=crtend.o OUTPUT_VARIABLE CRTEND OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
get_target_property(KERNEL_COMPILE_OPTIONS kernel COMPILE_OPTIONS)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${KERNEL_COMPILE_OPTIONS} -print-file-name=crtbegin.o OUTPUT_VARIABLE CRTBEGIN OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${KERNEL_COMPILE_OPTIONS} -print-file-name=crtend.o OUTPUT_VARIABLE CRTEND OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
add_custom_command(
|
||||
TARGET kernel PRE_LINK
|
||||
|
|
|
@ -76,8 +76,8 @@ banan_install_headers(objlibc)
|
|||
add_library(libc-static STATIC $<TARGET_OBJECTS:objlibc>)
|
||||
add_library(libc-shared SHARED $<TARGET_OBJECTS:objlibc>)
|
||||
|
||||
target_link_options(libc-static PRIVATE -nolibc)
|
||||
target_link_options(libc-shared PRIVATE -nolibc)
|
||||
target_link_options(libc-static PRIVATE -nostdlib)
|
||||
target_link_options(libc-shared PRIVATE -nostdlib)
|
||||
|
||||
install(TARGETS libc-static OPTIONAL)
|
||||
install(TARGETS libc-shared OPTIONAL)
|
||||
|
@ -86,6 +86,3 @@ set_target_properties(libc-static 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_SHARED_LIBRARY_PREFIX "")
|
||||
|
|
|
@ -9,5 +9,3 @@ banan_link_library(libfont ban)
|
|||
|
||||
banan_install_headers(libfont)
|
||||
install(TARGETS libfont OPTIONAL)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
|
|
|
@ -10,5 +10,3 @@ banan_link_library(libgui libc)
|
|||
|
||||
banan_install_headers(libgui)
|
||||
install(TARGETS libgui OPTIONAL)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
|
|
|
@ -11,5 +11,3 @@ banan_link_library(libimage ban)
|
|||
|
||||
banan_install_headers(libimage)
|
||||
install(TARGETS libimage OPTIONAL)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
|
|
|
@ -4,10 +4,8 @@ set(LIBINPUT_SOURCES
|
|||
)
|
||||
|
||||
add_library(libinput ${LIBINPUT_SOURCES})
|
||||
banan_include_headers(libinput ban)
|
||||
banan_link_library(libinput ban)
|
||||
banan_link_library(libinput libc)
|
||||
|
||||
banan_install_headers(libinput)
|
||||
install(TARGETS libinput OPTIONAL)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
|
|
|
@ -4,7 +4,7 @@ set(SOURCES
|
|||
)
|
||||
|
||||
add_executable(Terminal ${SOURCES})
|
||||
banan_include_headers(Terminal ban)
|
||||
banan_link_library(Terminal ban)
|
||||
banan_link_library(Terminal libc)
|
||||
banan_link_library(Terminal libfont)
|
||||
banan_link_library(Terminal libgui)
|
||||
|
|
|
@ -6,8 +6,8 @@ set(SOURCES
|
|||
)
|
||||
|
||||
add_executable(WindowServer ${SOURCES})
|
||||
banan_include_headers(WindowServer ban)
|
||||
banan_include_headers(WindowServer libgui)
|
||||
banan_link_library(WindowServer ban)
|
||||
banan_link_library(WindowServer libc)
|
||||
banan_link_library(WindowServer libfont)
|
||||
banan_link_library(WindowServer libimage)
|
||||
|
|
Loading…
Reference in New Issue