Hello,
I'm using vcpkg with default triplet set to x64-windows-static. All works fine.
I wanted to use OpenCascade via vcpkg but it can't be built statically.
Note: I can build OpenCascade dynamically. vcpkg install opencascade:x64-windows works.
So, to be able to build OpenCascade dynamic but everything else static, I tried to modify the default x64-windows-static.cmake file and added:
if(PORT MATCHES "opencascade")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
I got build errors.
Also tried to set VCPKG_CRT_LINKAGE:
if(PORT MATCHES "opencascade")
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
I got build errors:
PS C:\Sys\vcpkg> .\vcpkg.exe install opencascade
Computing installation plan...
The following packages will be built and installed:
opencascade[core]:x64-windows-static
Detecting compiler hash for triplet x64-windows-static...
Could not locate cached archive: C:\Users\Burak\AppData\Local\vcpkg\archives\b3\b32bd1af4b62caab2a1c2a134ad7dbb409bdb996.zip
Starting package 1/1: opencascade:x64-windows-static
Building package opencascade[core]:x64-windows-static...
-- Using cached C:/Sys/vcpkg/downloads/Open-Cascade-SAS-OCCT-V7_4_0.tar.gz
-- Cleaning sources at C:/Sys/vcpkg/buildtrees/opencascade/src/V7_4_0-43dc76957d.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Sys/vcpkg/downloads/Open-Cascade-SAS-OCCT-V7_4_0.tar.gz
-- Applying patch fix-msvc-32bit-builds.patch
-- Using source at C:/Sys/vcpkg/buildtrees/opencascade/src/V7_4_0-43dc76957d.clean
-- Configuring x64-windows-static
-- Building x64-windows-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:142 (message):
Command failed: C:/Sys/vcpkg/downloads/tools/cmake-3.18.4-windows/cmake-3.18.4-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v -j13
Working Directory: C:/Sys/vcpkg/buildtrees/opencascade/x64-windows-static-dbg
See logs for more information:
C:\Sys\vcpkg\buildtrees\opencascade\install-x64-windows-static-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:93 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/opencascade/portfile.cmake:38 (vcpkg_install_cmake)
scripts/ports.cmake:136 (include)
Error: Building package opencascade:x64-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: opencascade:x64-windows-static
Vcpkg version: 2020.11.12-nohash
I'm attaching the error log mentioned: install-x64-windows-static-dbg-out.log
Also, list of packages I have installed, in case it helps or is needed:
assimp:x64-windows-static 5.0.1#4 The Open Asset import library
brotli:x64-windows-static 1.0.9 a generic-purpose lossless compression algorithm...
bzip2:x64-windows-static 1.0.8#1 bzip2 is a freely available, patent free, high-q...
corrade:x64-windows-static 2020.06 C++11/C++14 multiplatform utility library
corrade[interconnect]:x64-windows-static Interconnect library
corrade[pluginmanager]:x64-windows-static PluginManager library
corrade[testsuite]:x64-windows-static TestSuite library
corrade[utility]:x64-windows-static Utility library
fmt:x64-windows-static 7.1.2 Formatting library for C++. It can be used as a ...
freeglut:x64-windows-static 3.2.1-4 Open source implementation of GLUT with source a...
freeimage:x64-windows-static 3.18.0#17 Support library for graphics image formats
freetype:x64-windows-static 2.10.2#5 A library to render fonts.
freetype[bzip2]:x64-windows-static Support bzip2 compressed fonts.
freetype[png]:x64-windows-static Support PNG compressed OpenType embedded bitmaps.
glfw3:x64-windows-static 3.3.2 GLFW is a free, Open Source, multi-platform libr...
glslang:x64-windows-static 2019-03-05-1 Khronos reference front-end for GLSL and ESSL, a...
imgui:x64-windows-static 1.79#1 Bloat-free Immediate Mode Graphical User interfa...
irrlicht:x64-windows-static 1.8.4-10 Irrlicht lightning fast 3d engine
jasper:x64-windows-static 2.0.20 Open source implementation of the JPEG-2000 Part...
jxrlib:x64-windows-static 2019.10.9#2 Open source implementation of the jpegxr image f...
kubazip:x64-windows-static 0.1.19 A portable, simple zip library written in C
lcms:x64-windows-static 2.11 Little CMS.
libffi:x64-windows-static 3.3#6 Portable, high level programming interface to va...
libjpeg-turbo:x64-windows 2.0.5 libjpeg-turbo is a JPEG image codec that uses SI...
libjpeg-turbo:x64-windows-static 2.0.5 libjpeg-turbo is a JPEG image codec that uses SI...
liblzma:x64-windows-static 5.2.5#2 Compression library with an API similar to that ...
libpng:x64-windows-static 1.6.37#13 libpng is a library implementing an interface fo...
libraw:x64-windows-static 201903-3 raw image decoder library
libwebp:x64-windows-static 1.1.0#1 WebP codec: library to encode and decode images ...
libwebp[nearlossless]:x64-windows-static Enable near-lossless encoding
libwebp[simd]:x64-windows-static Enable any SIMD optimization.
libwebp[unicode]:x64-windows-static Build Unicode executables. (Adds definition UNIC...
magnum-integration:x64-windows-static 2020.06 Integrations for magnum, C++11/C++14 graphics mi...
magnum-integration[imgui]:x64-windows-static ImGuiIntegration library
magnum-plugins:x64-windows-static 2020.06#1 Plugins for magnum, C++11/C++14 graphics middlew...
magnum-plugins[ddsimporter]:x64-windows-static DdsImporter plugin
magnum-plugins[freetypefont]:x64-windows-static FreeTypeFont plugin
magnum-plugins[icoimporter]:x64-windows-static IcoImporter plugin
magnum-plugins[jpegimporter]:x64-windows-static JpegImporter plugin
magnum-plugins[miniexrimageconverter]:x64-windo... MiniExrImageConverter plugin
magnum-plugins[openddl]:x64-windows-static OpenDdl library
magnum-plugins[opengeximporter]:x64-windows-static OpenGexImporter plugin
magnum-plugins[pngimporter]:x64-windows-static PngImporter plugin
magnum-plugins[stanfordimporter]:x64-windows-st... StanfordImporter plugin
magnum-plugins[stanfordsceneconverter]:x64-wind... StanfordSceneConverter plugin
magnum-plugins[stbimageconverter]:x64-windows-s... StbImageConverter plugin
magnum-plugins[stbimageimporter]:x64-windows-st... StbImageImporter plugin
magnum-plugins[stlimporter]:x64-windows-static StlImporter plugin
magnum:x64-windows-static 2020.06#1 C++11/C++14 graphics middleware for games and da...
magnum[anyaudioimporter]:x64-windows-static AnyAudioImporter plugin
magnum[anyimageconverter]:x64-windows-static AnyImageConverter plugin
magnum[anyimageimporter]:x64-windows-static AnyImageImporter plugin
magnum[anysceneconverter]:x64-windows-static AnySceneConverter plugin
magnum[anysceneimporter]:x64-windows-static AnySceneImporter plugin
magnum[audio]:x64-windows-static Audio library
magnum[debugtools]:x64-windows-static DebugTools library
magnum[gl]:x64-windows-static GL library
magnum[glfwapplication]:x64-windows-static GlfwApplication library
magnum[meshtools]:x64-windows-static MeshTools library
magnum[primitives]:x64-windows-static Primitives library
magnum[scenegraph]:x64-windows-static SceneGraph library
magnum[sdl2application]:x64-windows-static Sdl2Application library
magnum[shaders]:x64-windows-static Shaders library
magnum[text]:x64-windows-static Text library
magnum[texturetools]:x64-windows-static TextureTools library
magnum[trade]:x64-windows-static Trade library
minizip:x64-windows-static 1.2.11#7 Zip compression library
openal-soft:x64-windows-static 1.20.1#5 OpenAL Soft is an LGPL-licensed, cross-platform,...
openexr:x64-windows-static 2.5.0#1 OpenEXR is a high dynamic-range (HDR) image file...
opengl:x64-windows-static 0.0-7 Open Graphics Library (OpenGL)[3][4][5] is a cro...
openjpeg:x64-windows-static 2.3.1#2 JPEG 2000 image library
openssl:x64-windows-static 1.1.1h#2 OpenSSL is an open source project that provides ...
poly2tri:x64-windows-static 2020-07-21 The Clipper library performs clipping and offset...
polyclipping:x64-windows-static 6.4.2#6 The Clipper library performs clipping and offset...
python3:x64-windows-static 3.9.0 The Python programming language as an embeddable...
rapidjson:x64-windows-static 2020-09-14 A fast JSON parser/generator for C++ with both S...
sdl2:x64-windows-static 2.0.12#7 Simple DirectMedia Layer is a cross-platform dev...
stb:x64-windows-static 2020-09-14 public domain header-only libraries
tbb:x64-windows-static 2020_U3#2 Intel's Threading Building Blocks.
tiff:x64-windows-static 4.1.0 A library that supports the manipulation of TIFF...
utfcpp:x64-windows-static 3.1.2#1 UTF-8 with C++ in a Portable Way
zlib:x64-windows-static 1.2.11#9 A compression library
Hello,
I'm using vcpkg with default triplet set to x64-windows-static. All works fine.
I wanted to use OpenCascade via vcpkg but it can't be built statically.
Note: I can build OpenCascade dynamically. vcpkg install opencascade:x64-windows works.
So, to be able to build OpenCascade dynamic but everything else static, I tried to modify the default x64-windows-static.cmake file and added:
I got build errors.
Also tried to set VCPKG_CRT_LINKAGE:
I got build errors:
I'm attaching the error log mentioned: install-x64-windows-static-dbg-out.log
Also, list of packages I have installed, in case it helps or is needed: