1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:27:45 +00:00

Ports: Fix CMake-based ports

The SDL port failed to build because the CMake toolchain filed pointed
to the old root. Now the toolchain file assumes that the Root is in
Build/Root.

Additionally, the AK/ and Kernel/ headers need to be installed in the
root too.
This commit is contained in:
Paul Redmond 2020-05-26 14:20:24 -04:00 committed by Andreas Kling
parent b0b03c52af
commit 4d4e578edf
4 changed files with 11 additions and 7 deletions

View file

@ -40,7 +40,7 @@ add_subdirectory(DevTools/FormCompiler)
add_subdirectory(Libraries/LibWeb/CodeGenerators)
add_subdirectory(AK/Tests)
function(serenity_lib_headers target_name)
function(serenity_install_headers target_name)
file(GLOB_RECURSE headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
foreach(header ${headers})
get_filename_component(subdirectory ${header} DIRECTORY)
@ -49,7 +49,7 @@ function(serenity_lib_headers target_name)
endfunction()
function(serenity_lib target_name fs_name)
serenity_lib_headers(${target_name})
serenity_install_headers(${target_name})
add_library(${target_name} ${SOURCES} ${GENERATED_SOURCES})
install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib)
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name})
@ -63,7 +63,7 @@ function(serenity_lib target_name fs_name)
endfunction()
function(serenity_libc target_name fs_name)
serenity_lib_headers("")
serenity_install_headers("")
add_library(${target_name} ${SOURCES})
install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib)
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name})
@ -121,6 +121,7 @@ include_directories(Services)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/Services)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/Libraries)
add_subdirectory(AK)
add_subdirectory(Kernel)
add_subdirectory(Libraries)
add_subdirectory(Services)