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

[MSVC] How to install libf3d SDK? #1522

Closed
LiuPeiqiCN opened this issue Jul 7, 2024 · 2 comments
Closed

[MSVC] How to install libf3d SDK? #1522

LiuPeiqiCN opened this issue Jul 7, 2024 · 2 comments

Comments

@LiuPeiqiCN
Copy link

Build

function BuildForWindows($platform, $vcpkgPath, $runMsbuild) {

    #$ErrorActionPreference = "Stop"

    $buildDirectory = "build_win_${platform}"
    mkdir $buildDirectory -Force -ErrorAction Stop | Out-Null
    cd $buildDirectory
    pwd

    if ($platform -eq "x64") {
        $msbuildPlatform = "x64"
    } else {
        $msbuildPlatform = "Win32"
    }

    cmake -G "Visual Studio 17 2022" `
          -A $msbuildPlatform `
          -Wno-dev `
          -D CMAKE_INSTALL_PREFIX=install `
          -D CMAKE_DEBUG_POSTFIX="d" `
          -D CMAKE_TOOLCHAIN_FILE="${vcpkgPath}/scripts/buildsystems/vcpkg.cmake" `
          -D VCPKG_INSTALLED_DIR="${vcpkgPath}/installed" `
          -D VCPKG_TARGET_TRIPLET="x64-windows" `
          -D VCPKG_TRACE_FIND_PACKAGE=OFF `
          -D VCPKG_MANIFEST_INSTALL=OFF `
          -D VCPKG_VERBOSE=ON `
          `
          -D F3D_PLUGIN_BUILD_ALEMBIC=ON `
          -D F3D_PLUGIN_BUILD_ASSIMP=ON `
          `
          -D Alembic_DIR="${vcpkgPath}/installed/${platform}-windows-static/share/alembic" `
          -D assimp_DIR="E:/vcpkgs/assimp/lib/cmake/assimp-5.2" `
          -D VTK_DIR="${vcpkgPath}/installed/${platform}-windows/share/vtk" `
          -D ZLIB_INCLUDE_DIR="${vcpkgPath}/installed/${platform}-windows/include" `
          -D ZLIB_LIBRARY_DEBUG="${vcpkgPath}/installed/${platform}-windows/debug/lib/zlibd.lib" `
          -D JsonCpp_INCLUDE_DIR="${vcpkgPath}/installed/${platform}-windows/include" `
          -D JsonCpp_LIBRARY="${vcpkgPath}/installed/${platform}-windows/lib/jsoncpp.lib" `
          -D BUILD_SHARED_LIBS=ON `
          ../f3d `

    if ($runMsbuild) {
        msbuild INSTALL.vcxproj /t:build /p:configuration=Release /p:platform=$msbuildPlatform -maxcpucount
        ls
    }

    cd ..
}


# Entry point
If ((Resolve-Path -Path $MyInvocation.InvocationName).ProviderPath -eq $MyInvocation.MyCommand.Path) {

  cd (Split-Path -Parent $MyInvocation.MyCommand.Definition)
  pwd

  ##### Change here #####
  $vcpkgPath = "E:/vcpkg"
  $platform = "x64"

  BuildForWindows $platform $vcpkgPath $FALSE
}

Run INSTALL"
image

Headers and libraries missing:
image

F3D_INSTALL_SDK is not working.

@Meakk
Copy link
Contributor

Meakk commented Jul 7, 2024

Please see https://f3d.app/doc/dev/BUILD.html (installation)

cmake --install {build_dir} --component sdk

Let me know if it works.

@mwestphal
Copy link
Contributor

no feedback from @LiuPeiqiCN , closing.

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

No branches or pull requests

3 participants