2024-07-16 11:33:39 +00:00
|
|
|
add_library(ladybird_impl STATIC
|
2024-06-04 20:00:26 +00:00
|
|
|
${LADYBIRD_SOURCES}
|
|
|
|
Application/Application.mm
|
|
|
|
Application/ApplicationDelegate.mm
|
2024-11-09 17:50:33 +00:00
|
|
|
Interface/Event.mm
|
|
|
|
Interface/Inspector.mm
|
|
|
|
Interface/InspectorController.mm
|
|
|
|
Interface/LadybirdWebView.mm
|
|
|
|
Interface/LadybirdWebViewBridge.cpp
|
|
|
|
Interface/LadybirdWebViewWindow.mm
|
|
|
|
Interface/Palette.mm
|
|
|
|
Interface/SearchPanel.mm
|
|
|
|
Interface/Tab.mm
|
|
|
|
Interface/TabController.mm
|
2024-06-04 20:00:26 +00:00
|
|
|
Utilities/Conversions.mm
|
|
|
|
)
|
2024-07-16 11:33:39 +00:00
|
|
|
target_include_directories(ladybird_impl PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
|
|
|
|
|
|
target_compile_options(ladybird_impl PUBLIC
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>:-fobjc-arc>
|
|
|
|
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-anon-enum-enum-conversion> # Required for CGImageCreate
|
|
|
|
)
|
|
|
|
target_compile_features(ladybird_impl PUBLIC cxx_std_23)
|
|
|
|
|
|
|
|
if (ENABLE_SWIFT)
|
|
|
|
target_sources(ladybird_impl PRIVATE
|
2024-11-09 17:50:33 +00:00
|
|
|
Interface/TaskManager.swift
|
|
|
|
Interface/TaskManagerController.swift
|
2024-07-16 11:33:39 +00:00
|
|
|
)
|
|
|
|
target_compile_definitions(ladybird_impl PUBLIC LADYBIRD_USE_SWIFT)
|
|
|
|
set_target_properties(ladybird_impl PROPERTIES Swift_MODULE_NAME "SwiftLadybird")
|
|
|
|
|
|
|
|
get_target_property(LADYBIRD_NATIVE_DIRS ladybird_impl INCLUDE_DIRECTORIES)
|
|
|
|
_swift_generate_cxx_header(ladybird_impl "Ladybird-Swift.h"
|
|
|
|
SEARCH_PATHS ${LADYBIRD_NATIVE_DIRS}
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
target_sources(ladybird_impl PRIVATE
|
2024-11-09 17:50:33 +00:00
|
|
|
Interface/TaskManager.mm
|
|
|
|
Interface/TaskManagerController.mm
|
2024-07-16 11:33:39 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(ladybird MACOSX_BUNDLE
|
|
|
|
main.mm
|
2024-06-04 20:00:26 +00:00
|
|
|
)
|
2024-07-22 15:09:25 +00:00
|
|
|
target_link_libraries(ladybird_impl PUBLIC "-framework Cocoa -framework UniformTypeIdentifiers" LibUnicode)
|
|
|
|
target_link_libraries(ladybird PRIVATE ladybird_impl)
|
2024-07-16 11:33:39 +00:00
|
|
|
|
2024-06-04 20:00:26 +00:00
|
|
|
create_ladybird_bundle(ladybird)
|