pmed / v8pp

Bind C++ functions and classes into V8 JavaScript engine
http://pmed.github.io/v8pp/
Other
886 stars 118 forks source link

Fix missing INTERFACE_INCLUDE_DIRECTORIES in exported config #182

Closed arghness closed 1 year ago

arghness commented 1 year ago

CMAKE_INSTALL_INCLUDEDIR was used before including GNUInstallDirs, causing the first configuration to miss INTERFACE_INCLUDE_DIRECTORIES. Configuring a second time worked, though. Tested with CMake 3.17.5.

I haven't included it here, as I think it might be a breaking change for existing users, but I'd also suggest changing the name of the configuration file from Config.cmake to v8pp-config.cmake or v8ppConfig.cmake, as currently it looks like the config filename needs to be included in the find(). e.g. find_package(v8pp REQUIRED CONFIGS Config.cmake)

For the supported filenames, see the "Config mode" section in https://cmake.org/cmake/help/latest/command/find_package.html#search-modes