Switched to global Bundles.cmake

This commit is contained in:
Max Wash
2020-08-23 19:39:19 +01:00
parent cff3723792
commit 9d384d164c
2 changed files with 9 additions and 148 deletions

View File

@@ -13,7 +13,6 @@ macro(subdirlist result curdir)
endmacro()
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/platform.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Bundles.cmake)
platform_config(${PHOTON_TARGET})
message(STATUS "Target: ${machine}-${platform}")
@@ -79,16 +78,17 @@ add_framework(Photon STATIC
SOURCES ${photon_libc_sources} ${photon_libc_headers}
HEADERS ${CMAKE_CURRENT_BINARY_DIR}/sysroot/usr/include/*)
framework_compile_options(Photon -ffreestanding -nostdlib)
framework_link_libraries(Photon ${photon_platform_libs})
framework_link_frameworks(Photon ${photon_platform_frameworks})
bundle_compile_options(Photon PRIVATE -ffreestanding -nostdlib)
bundle_link_libraries(Photon ${photon_platform_libs})
bundle_link_frameworks(Photon ${photon_platform_frameworks})
framework_include_directories(Photon ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/include
bundle_include_directories(Photon PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/include
${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/
${CMAKE_CURRENT_BINARY_DIR}/sysroot/usr/include)
foreach (platform_include_dir ${photon_platform_extra_include_dirs})
framework_include_directories(Photon
bundle_include_directories(Photon
${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/${platform_include_dir})
endforeach (platform_include_dir)
@@ -99,7 +99,7 @@ add_custom_target(local-root
${CMAKE_CURRENT_BINARY_DIR}
${platform} ${machine})
framework_add_dependencies(Photon local-root crt)
bundle_add_dependencies(Photon local-root crt)
add_custom_command(TARGET Photon POST_BUILD
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/add-framework-crt.sh
@@ -107,12 +107,12 @@ add_custom_command(TARGET Photon POST_BUILD
${CMAKE_CURRENT_BINARY_DIR})
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
framework_link_libraries(Photon gcc)
bundle_link_libraries(Photon gcc)
endif ()
if (TARGET early-sysroot)
# We are being built as part of asbestOS, make sure the sysroot is there.
framework_add_dependencies(Photon early-sysroot)
bundle_add_dependencies(Photon early-sysroot)
endif ()
if (PHOTON_TESTS EQUAL 1)