Set up build/packaging infra for web builds #1

Merged
lisyarus merged 9 commits from yulya3102/psemek:web into master 2026-07-03 08:40:27 +00:00
5 changed files with 21 additions and 4 deletions
Showing only changes of commit 08d77d6e93 - Show all commits

View file

@ -1,3 +1,12 @@
if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
set(BOOST_INCLUDE_LIBRARIES random stacktrace math)
set(BOOST_ENABLE_COMPATIBILITY_TARGETS 1)
add_subdirectory(boost EXCLUDE_FROM_ALL)
# TODO: make this available via find_package so we wouldn't have to
# special-case it in every library
endif()
file(GLOB_RECURSE RAPIDJSON_SOURCES "${CMAKE_CURRENT_LIST_DIR}/rapidjson/include/*") file(GLOB_RECURSE RAPIDJSON_SOURCES "${CMAKE_CURRENT_LIST_DIR}/rapidjson/include/*")
add_library(rapidjson INTERFACE EXCLUDE_FROM_ALL "${RAPIDJSON_SOURCES}") add_library(rapidjson INTERFACE EXCLUDE_FROM_ALL "${RAPIDJSON_SOURCES}")
target_include_directories(rapidjson INTERFACE "${CMAKE_CURRENT_LIST_DIR}/rapidjson/include") target_include_directories(rapidjson INTERFACE "${CMAKE_CURRENT_LIST_DIR}/rapidjson/include")

View file

@ -1,6 +1,8 @@
option(PSEMEK_ROBUST_PREDICATES "Use robust geometric predicates" OFF) option(PSEMEK_ROBUST_PREDICATES "Use robust geometric predicates" OFF)
find_package(Boost REQUIRED) if(NOT (CMAKE_SYSTEM_NAME STREQUAL Emscripten))
find_package(Boost REQUIRED)
endif()
if(PSEMEK_ROBUST_PREDICATES) if(PSEMEK_ROBUST_PREDICATES)
find_package(GMP REQUIRED) find_package(GMP REQUIRED)
endif() endif()

View file

@ -1,4 +1,6 @@
find_package(Boost COMPONENTS random REQUIRED) if(NOT (CMAKE_SYSTEM_NAME STREQUAL Emscripten))
find_package(Boost COMPONENTS random REQUIRED)
endif()
file(GLOB_RECURSE PSEMEK_PCG_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp") file(GLOB_RECURSE PSEMEK_PCG_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp")
file(GLOB_RECURSE PSEMEK_PCG_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp") file(GLOB_RECURSE PSEMEK_PCG_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp")

View file

@ -1,4 +1,6 @@
find_package(Boost COMPONENTS random REQUIRED) if(NOT (CMAKE_SYSTEM_NAME STREQUAL Emscripten))
find_package(Boost COMPONENTS random REQUIRED)
endif()
file(GLOB_RECURSE PSEMEK_RANDOM_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp") file(GLOB_RECURSE PSEMEK_RANDOM_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp")
file(GLOB_RECURSE PSEMEK_RANDOM_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp") file(GLOB_RECURSE PSEMEK_RANDOM_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp")

View file

@ -1,4 +1,6 @@
find_package(Boost REQUIRED) if(NOT (CMAKE_SYSTEM_NAME STREQUAL Emscripten))
find_package(Boost REQUIRED)
endif()
file(GLOB_RECURSE PSEMEK_UTIL_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp") file(GLOB_RECURSE PSEMEK_UTIL_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp")
file(GLOB_RECURSE PSEMEK_UTIL_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp") file(GLOB_RECURSE PSEMEK_UTIL_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp")