Open GavinNL opened 4 years ago
A pull request adding install support is welcome! https://cmake.org/cmake/help/latest/command/install.html is the relevant cmake command.
I think it'd need to install the files in v8/include (could just glob that), the static/shared libraries and possibly the d8
binary.
Tools used in intermediate build steps (like the mksnapshot
binary) don't have to be installed.
I would have done it except I'm not entirely sure what header files are needed. Sometimes projects create header files dynamically in their build script.
I did a dpkg -L
on my libv8-dev
and libv8-3.14.5
which are in my ubuntu repo and these are the files that are installed. This version is very old, so newer versions probably have different files.
gavin@Home:~$ dpkg -L libv8-3.14.5
/.
/usr
/usr/lib
/usr/lib/libv8.so.3.14.5
/usr/share
/usr/share/doc
/usr/share/doc/libv8-3.14.5
/usr/share/doc/libv8-3.14.5/AUTHORS
/usr/share/doc/libv8-3.14.5/README.Debian.security
/usr/share/doc/libv8-3.14.5/changelog.Debian.gz
/usr/share/doc/libv8-3.14.5/copyright
gavin@Home:~$ dpkg -L libv8-dev
/usr
/usr/include
/usr/include/v8-debug.h
/usr/include/v8-preparser.h
/usr/include/v8-profiler.h
/usr/include/v8-testing.h
/usr/include/v8.h
/usr/include/v8stdint.h
/usr/lib
/usr/share
/usr/share/doc
/usr/share/doc/libv8-dev
/usr/share/doc/libv8-dev/copyright
/usr/share/doc/libv8-dev/examples
/usr/share/doc/libv8-dev/examples/count-hosts.js
/usr/share/doc/libv8-dev/examples/lineprocessor.cc.gz
/usr/share/doc/libv8-dev/examples/process.cc.gz
/usr/share/doc/libv8-dev/examples/samples.gyp
/usr/share/doc/libv8-dev/examples/shell.cc.gz
/usr/lib/libv8.so
/usr/share/doc/libv8-dev/AUTHORS
/usr/share/doc/libv8-dev/changelog.Debian.gz
I think a better way to check which files are installed is to do a build/install of the original project using google's build script, and then check which files are installed and also if any of them are dynamically created (hopefully they are not)
V8 has a strict separation between public API and internals. The *.h files in v8/include and v8/include/libplatform are what you want.
That might change a bit when v8-cmake grows more inspector integration but we'll cross that bridge when we get to it.
Hi!
First off, thank you for creating this library! I've been looking for a scripting engine for my C++ project and was considering using javascript, but trying compile V8 was such a pain. Your Cmake version compiled without any issues on Linux Mint 19!
I did notice that the install target was not created, so I couldn't do a
make install
. Is it possible to get this added? It would really help me when creating a conan package for this library.Thanks again!