Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] fmt #350

Merged
merged 21 commits into from
Feb 18, 2024
Merged

[feature] fmt #350

merged 21 commits into from
Feb 18, 2024

Conversation

danoli3
Copy link
Member

@danoli3 danoli3 commented Feb 14, 2024

Add fmt
#304

Initial runner test

@danoli3 danoli3 marked this pull request as draft February 14, 2024 15:47
@dimitre
Copy link
Member

dimitre commented Feb 14, 2024

Greaaattt

@danoli3
Copy link
Member Author

danoli3 commented Feb 15, 2024

Okay concept and execution for Emscripten build process in the last commit:

if(EMSCRIPTEN)
    set(FMT_WASM_SOURCES
        ${FMT_SOURCES}
        ${FMT_HEADERS}
    )
    add_executable(fmt_wasm
        ${FMT_WASM_SOURCES}
    )
    target_include_directories(fmt_wasm PRIVATE
        ${CMAKE_CURRENT_SOURCE_DIR}/include
    )
    set_target_properties(fmt_wasm PROPERTIES COMPILE_FLAGS "-Os -s SIDE_MODULE=1 ")
    set_target_properties(fmt_wasm PROPERTIES LINK_FLAGS    "-Os -s WASM=1 -s SIDE_MODULE=1 -s STANDALONE_WASM --no-entry")
    set(CMAKE_EXECUTABLE_SUFFIX ".wasm")

endif()

This should work we will need to test linking.

elif [ "$TYPE" == "emscripten" ]; then
		mkdir -p build_$TYPE
	  cd build_$TYPE
	  $EMSDK/upstream/emscripten/emcmake cmake .. \
	   ${DEFS} \
	   -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
	   -DCMAKE_C_STANDARD=17 \
	-DCMAKE_CXX_STANDARD=17 \
	-DCMAKE_CXX_STANDARD_REQUIRED=ON \
	-DCMAKE_CXX_FLAGS="-DUSE_PTHREADS=1 -std=c++17 -Wno-implicit-function-declaration -frtti ${FLAG_RELEASE}" \
	-DCMAKE_C_FLAGS="-DUSE_PTHREADS=1 -std=c17 -Wno-implicit-function-declaration -frtti ${FLAG_RELEASE}" \
	-DCMAKE_CXX_EXTENSIONS=OFF \
	-DBUILD_SHARED_LIBS=OFF \
		  -DCMAKE_INSTALL_PREFIX=Release \
          -DCMAKE_INCLUDE_OUTPUT_DIRECTORY=include \
          -DCMAKE_INSTALL_INCLUDEDIR=include \
          -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=. \
		  -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=. \
		  -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. 
	  cmake --build . --target install --config Release
	  cd ..
fi

@danoli3
Copy link
Member Author

danoli3 commented Feb 15, 2024

PR against origin fmt:
fmtlib/fmt#3852

Added to local formulae /fmt folder with patch for now

@danoli3 danoli3 marked this pull request as ready for review February 18, 2024 00:35
@danoli3 danoli3 merged commit d9c882c into openframeworks:bleeding Feb 18, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants