mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 00:08:55 +00:00
CMake: Only find pthread and mman on Windows once
This reduces a lot of CMake spam when configuring
This commit is contained in:
parent
a3754a7bf1
commit
a6d9e8acd8
Notes:
github-actions[bot]
2025-05-12 09:23:26 +00:00
Author: https://github.com/ayeteadoe
Commit: a6d9e8acd8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4667
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/alimpfard
1 changed files with 5 additions and 2 deletions
|
@ -204,6 +204,11 @@ install(
|
|||
COMPONENT Lagom_Development
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
find_package(pthread REQUIRED)
|
||||
find_package(mman REQUIRED)
|
||||
endif()
|
||||
|
||||
function(lagom_lib target_name fs_name)
|
||||
cmake_parse_arguments(LAGOM_LIBRARY "EXPLICIT_SYMBOL_EXPORT" "LIBRARY_TYPE" "SOURCES;LIBS" ${ARGN})
|
||||
string(REPLACE "Lib" "" library ${target_name})
|
||||
|
@ -226,11 +231,9 @@ function(lagom_lib target_name fs_name)
|
|||
endif()
|
||||
|
||||
if (WIN32)
|
||||
find_package(pthread REQUIRED)
|
||||
target_include_directories(${target_name} PRIVATE ${PTHREAD_INCLUDE_DIR})
|
||||
target_link_libraries(${target_name} PRIVATE ${PTHREAD_LIBRARY})
|
||||
|
||||
find_package(mman REQUIRED)
|
||||
target_include_directories(${target_name} PRIVATE ${MMAN_INCLUDE_DIR})
|
||||
target_link_libraries(${target_name} PRIVATE ${MMAN_LIBRARY})
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue