GithubHelp home page GithubHelp logo

Windows vcpkg support about libpmemobj-cpp HOT 5 CLOSED

pmem avatar pmem commented on July 20, 2024
Windows vcpkg support

from libpmemobj-cpp.

Comments (5)

igchor avatar igchor commented on July 20, 2024

From what I see, there is libpmemobj-cpp 1.6 in vcpkg: https://github.com/microsoft/vcpkg/blob/master/ports/libpmemobj-cpp/portfile.cmake.

If you need newer version, we can ping guys from vcpkg to update to 1.7

from libpmemobj-cpp.

seghcder avatar seghcder commented on July 20, 2024

Yes you are right. It would help to update to 1.7 (strings!!!).

One thing I noticed is that both the PMDK vcpkg and it seems this one too are missing cmake files once installed. This means find_package doesn't work, and it harder to get running in the Windows cmake toolset - eg for using VS build tools (without full Visual Studio) and Clion.

For example, at the end of installing many packages you get this message:

The package fmt:x64-windows provides CMake targets:
    find_package(fmt CONFIG REQUIRED)
    target_link_libraries(main PRIVATE fmt::fmt)

fmt portfile

For the time being, this seems to work across Windows and Linux in cmake for PMDK:

find_path(PMDK_INCLUDE_DIRS libpmemobj.h)
find_library(PMDK_LIBPMEMOBJ_LIBRARY NAMES libpmemobj libpmemobj.so HINTS /usr/local/lib64/)

as long as you point cmake to the vcpkg cmake file -

cmake.exe -CMAKE_TOOLCHAIN_FILE=d:/vcpkg/scripts/buildsystems/vcpkg.cmake

So perhaps this issue could be tagged to add cmake support within vcpkg? Its also possible I am missing something again too.

PS: For some reason I still have trouble typing vcpkg .. is it just me? Its like a tongue twister for my fingers.

from libpmemobj-cpp.

igchor avatar igchor commented on July 20, 2024

Support for find_package is indeed missing both for libpmemobj-cpp and PMDK. For libpmemobj-cpp it should be quite easy to add this to vcpkg - we generate appropriate files during build.

If this is what you need, you can create a request for vcpkg: https://github.com/microsoft/vcpkg/issues :)

PMDK on the other hand does not use CMake as a build system so providing cmake integration would be rather challenging.

As for libpmemobj version, I just noted that there is already a PR to update libpmemobj-cpp to 1.7: microsoft/vcpkg#7494

from libpmemobj-cpp.

seghcder avatar seghcder commented on July 20, 2024

Submitted microsoft/vcpkg#7632

v1.7 now installing too.

Is it possible to provide cmake targets even if the build system is not cmake? It seems it just helps CMake find the appropriate include/lib dirs, regardless of what built the libraries in the first place. Still fairly new to CMake :-)

Will close this one anyway for libpmemobj-cpp.

from libpmemobj-cpp.

igchor avatar igchor commented on July 20, 2024

In libpmemobj-cpp we have created a cmake script which allows to use fund_package() for libpmemobj:
https://github.com/pmem/libpmemobj-cpp/blob/master/cmake/FindLIBPMEMOBJ.cmake

I think it could be possible to distribute this script along with PMDK in vcpkg. We should probably investigate that

from libpmemobj-cpp.

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.