Giter VIP home page Giter VIP logo

Comments (1)

danoli3 avatar danoli3 commented on July 17, 2024 1

Cool proof of concept I just know we gonna hit some snags with that system

Definitely refer to the existing formulaes rather than make from scratch as the depths of issues resolved

"defines": [
				"BUILD_SHARED_LIBS=OFF",
				"ASSIMP_BUILD_TESTS=0",
				"ASSIMP_BUILD_SAMPLES=0",
				"ASSIMP_BUILD_3MF_IMPORTER=0",
				"CMAKE_COMPILE_WARNING_AS_ERROR=0",
				"CMAKE_OSX_DEPLOYMENT_TARGET=10.9",
				// "CMAKE_C_FLAGS=-arch arm64 -arch x86_64 -O3 -DNDEBUG -funroll-loops -Werror",
				"CMAKE_C_FLAGS=-fPIC",
				"CMAKE_CXX_FLAGS=-arch arm64 -arch x86_64 -O3 -DNDEBUG -funroll-loops -std=c++11 -Werror"
			],
			// "defaultRunArguments": [
			// 	"BUILD_SHARED_LIBS=OFF",
			// 	"ASSIMP_BUILD_TESTS=0",
			// 	"ASSIMP_BUILD_SAMPLES=0",
			// 	"ASSIMP_BUILD_3MF_IMPORTER=0"
			// ],
			"location": "${external:assimp}",
			"recheck": false,
			"rebuild": false

See

cmake .. ${DEFS} \

A few notes:

  • Needs to be C17 / C++17 via Cmake: DCMAKE_C_STANDARD / DCMAKE_CXX_STANDARD
  • Link to zlib rather than build subdependancy (and not use system libs as this will crash if arm64 and compiled on x86_64)
  • Currently No toolchain use - ios/macos cmake toolchain is robust see if chalet can get that too
  • Verify other missing flags
  • No Pthread use (mac,unix)
  • OSX Min: 10.15
  • OSX Target: 14.0

See

if [[ "$TYPE" =~ ^(osx|ios|tvos|xros|catos|watchos)$ ]]; then
        echo "building $TYPE | $ARCH $PLATFORM"
        echo "--------------------" 
        ZLIB_ROOT="$LIBS_ROOT/zlib/"
        ZLIB_INCLUDE_DIR="$LIBS_ROOT/zlib/include"
        ZLIB_LIBRARY="$LIBS_ROOT/zlib/lib/$TYPE/$PLATFORM/zlib.a"   

        mkdir -p "build_${TYPE}_${PLATFORM}"
        cd "build_${TYPE}_${PLATFORM}"
        rm -f CMakeCache.txt || true
        find ./ -name "*.o" -type f -delete
        DEFS="
            -DASSIMP_BUILD_TESTS=0
            -DASSIMP_BUILD_SAMPLES=0
            -DASSIMP_BUILD_3MF_IMPORTER=0
            -DASSIMP_BUILD_ZLIB=OFF 
            -DASSIMP_WARNINGS_AS_ERRORS=OFF"

        cmake .. ${DEFS} \
            -DCMAKE_C_STANDARD=17 \
            -DCMAKE_CXX_STANDARD=17 \
            -DCMAKE_CXX_STANDARD_REQUIRED=ON \
            -DCMAKE_CXX_FLAGS="-DUSE_PTHREADS=1" \
            -DCMAKE_C_FLAGS="-DUSE_PTHREADS=1" \
            -DCMAKE_CXX_EXTENSIONS=OFF \
            -DBUILD_SHARED_LIBS=OFF \
            -DDEPLOYMENT_TARGET=${MIN_SDK_VER} \
            -DCMAKE_BUILD_TYPE=Release \
            -DCMAKE_INSTALL_PREFIX=Release \
            -DCMAKE_INCLUDE_OUTPUT_DIRECTORY=include \
            -DCMAKE_INSTALL_INCLUDEDIR=include \
            -DCMAKE_TOOLCHAIN_FILE=$APOTHECARY_DIR/toolchains/ios.toolchain.cmake \
            -DPLATFORM=$PLATFORM \
            -DENABLE_BITCODE=OFF \
            -DENABLE_ARC=OFF \
            -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
            -DENABLE_VISIBILITY=OFF \
            -DCMAKE_PREFIX_PATH="${LIBS_ROOT}" \
            -DZLIB_ROOT=${ZLIB_ROOT} \
            -DZLIB_INCLUDE_DIR=${ZLIB_INCLUDE_DIR} \
            -DZLIB_LIBRARY=${ZLIB_LIBRARY} \
            -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_MAKEFILE} 

        cmake --build . --config Release

For many formulaes custom patches and cmakelists are packaged just make sure to look at what has been done else it will be a nightmare to debug. Can chalet embed files?

The one thing I like about chalet is the https://www.chalet-work.space/docs/adding-packages
cmake package generator but I tihnk this is as simple as packaging a cmake config file with binaries so makes it easier in cmakelists to find(PNG).

think your best bet is to first actually build apothecary from scratch with the build scripts and compare to the outputs

from apothecary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.