Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 22, 2023
1 parent 66967e4 commit eb48791
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ cmake_minimum_required(VERSION 3.20)

project(carimbo)

function(embed target file destination)
get_filename_component(absolute_file ${file} ABSOLUTE)
get_target_property(${target}_LINK_FLAGS ${target} LINK_FLAGS)
if(NOT ${target}_LINK_FLAGS)
set(${target}_LINK_FLAGS )
endif()
set_target_properties(${target} PROPERTIES LINK_FLAGS "${${target}_LINK_FLAGS} --embed-file ${absolute_file}@${destination}")
# set_target_properties(${target} PROPERTIES LINK_FLAGS "${${target}_LINK_FLAGS} --preload-file ${absolute_file}@${destination}")
endfunction()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand Down Expand Up @@ -46,11 +36,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
target_link_libraries(${PROJECT_NAME} "-s NO_DISABLE_EXCEPTION_CATCHING")

target_link_libraries(${PROJECT_NAME} "-s ALLOW_MEMORY_GROWTH=1")
target_link_libraries(${PROJECT_NAME} "-s FORCE_FILESYSTEM=1")
# target_link_libraries(${PROJECT_NAME} "-s FORCE_FILESYSTEM=1")
target_link_libraries(${PROJECT_NAME} "-s INITIAL_MEMORY=134217728")
target_link_libraries(${PROJECT_NAME} "-s EXPORTED_RUNTIME_METHODS=['callMain']")

# embed(${PROJECT_NAME} "${CMAKE_BINARY_DIR}/bundle.zip" "/bundle.zip")
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror -pedantic -Os)
elseif(CMAKE_BUILD_TYPE MATCHES "Debug")
if (MSVC)
Expand Down

0 comments on commit eb48791

Please sign in to comment.