diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-05-12 21:03:54 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-05-12 21:03:54 (GMT) |
commit | 11e7301fb1f86a35e35072c8e4753095d28dc43c (patch) | |
tree | bf05b7622966265a26cc5f5f3d7a8a7d05fe4aed /contrib/cmake/FindV8.cmake | |
parent | 3cfb5df8f3b0571a529d05e51218eb9f4fdc1930 (diff) | |
download | uscxml-11e7301fb1f86a35e35072c8e4753095d28dc43c.zip uscxml-11e7301fb1f86a35e35072c8e4753095d28dc43c.tar.gz uscxml-11e7301fb1f86a35e35072c8e4753095d28dc43c.tar.bz2 |
Builds and links and tests ok on linux now
Diffstat (limited to 'contrib/cmake/FindV8.cmake')
-rw-r--r-- | contrib/cmake/FindV8.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/cmake/FindV8.cmake b/contrib/cmake/FindV8.cmake index 819bedd..e3ec38c 100644 --- a/contrib/cmake/FindV8.cmake +++ b/contrib/cmake/FindV8.cmake @@ -50,6 +50,21 @@ else() endif() endif() +# I have no idea how we would find the version otherwise :( +include(CheckCXXSourceCompiles) +set(CMAKE_REQUIRED_INCLUDES ${V8_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${V8_LIBRARY}) +check_cxx_source_compiles(" + #include <v8> + int main(){ v8::Array::New(v8::Isolate::GetCurrent()); } +" V8_VER_AFTER_032318) + +if (NOT V8_VER_AFTER_032318) + message(STATUS "Your V8 installation is too old - we need >= 3.23.17") + unset(V8_LIBRARY) + unset(V8_INCLUDE_DIR) +endif() + INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(V8 DEFAULT_MSG V8_LIBRARY V8_INCLUDE_DIR) MARK_AS_ADVANCED(V8_LIBRARY V8_INCLUDE_DIR) |