diff --git a/.gitignore b/.gitignore index 26adf6c..c22ffdf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,8 @@ build/ **.so **.o **.sconsign* -Inventor/**.h +Inventor/*.h +Inventor/**/**.h VolumeViz/**.h SoPyScript/swigpyrun.h examples/SoPyScript/examin diff --git a/README.md b/README.md index aefbe95..768e27f 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ Starting with version 0.6.6 pivy it's possible to build pivy with cmake: $ cd pivy $ mkdir build $ cd build - $ cmake .. - $ make + $ cmake .. --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DPython_ROOT_DIR:PATH="path/to/python/root/dir" -DX_VCPKG_APPLOCAL_DEPS_INSTALL:BOOLEAN=ON + $ cmake --build . + $ cmake --install . ``` Alternative it's still possible to use [distutils][0]: diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index 0c36c2f..cf32652 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -26,10 +26,10 @@ swig_add_library(coin if (APPLE) set_target_properties(coin PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") -elseif (MSVC) +endif() + +if (MSVC) set_target_properties(coin PROPERTIES COMPILE_FLAGS "/bigobj") -elseif(WIN32) - target_link_libraries(coin PUBLIC ${Python_LIBRARIES}) endif () target_include_directories(coin @@ -40,7 +40,7 @@ target_include_directories(coin ${CMAKE_SOURCE_DIR}/interfaces ) -target_link_libraries(coin PUBLIC Coin::Coin) +target_link_libraries(coin PUBLIC Coin::Coin Python::Module) install(TARGETS coin DESTINATION ${PIVY_Python_SITEARCH}/pivy) @@ -63,10 +63,10 @@ if (SoQt_FOUND) if (APPLE) set_target_properties(soqt PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") - elseif (MSVC) + endif() + + if (MSVC) set_target_properties(coin PROPERTIES COMPILE_FLAGS "/bigobj") - elseif (WIN32) - target_link_libraries(soqt PUBLIC ${Python_LIBRARIES}) endif () if (PIVY_USE_QT6) @@ -85,6 +85,6 @@ if (SoQt_FOUND) ${CMAKE_SOURCE_DIR}/interfaces ) - target_link_libraries(soqt PUBLIC SoQt::SoQt) + target_link_libraries(soqt PUBLIC SoQt::SoQt Python::Module) install(TARGETS soqt DESTINATION ${PIVY_Python_SITEARCH}/pivy/gui) endif() diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 0000000..5fb00ca --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,14 @@ +{ + "default-registry": { + "kind": "git", + "baseline": "5e5d0e1cd7785623065e77eff011afdeec1a3574", + "repository": "https://github.com/microsoft/vcpkg" + }, + "registries": [ + { + "kind": "artifact", + "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip", + "name": "microsoft" + } + ] +} diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..af71435 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,5 @@ +{ + "dependencies": [ + "soqt" + ] +}