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 | |
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')
-rw-r--r-- | contrib/cmake/FindJSC.cmake | 9 | ||||
-rw-r--r-- | contrib/cmake/FindV8.cmake | 15 |
2 files changed, 21 insertions, 3 deletions
diff --git a/contrib/cmake/FindJSC.cmake b/contrib/cmake/FindJSC.cmake index 2040ccf..456cc68 100644 --- a/contrib/cmake/FindJSC.cmake +++ b/contrib/cmake/FindJSC.cmake @@ -1,6 +1,6 @@ if (NOT APPLE) - FIND_PATH(JSC_INCLUDE_DIR JavaScriptCore/JavaScriptCore.h - PATH_SUFFIXES webkitgtk-1.0 webkitgtk-3.0 + FIND_PATH(JSC_INCLUDE_DIR JavaScriptCore/JSBase.h + PATH_SUFFIXES webkitgtk-4.0 webkitgtk-3.0 webkitgtk-1.0 PATHS /usr/local /usr @@ -11,8 +11,11 @@ if (NOT APPLE) ) endif() +FIND_PATH(HAS_JSC_JAVASCRIPTCORE_H JavaScriptCore/JavaScriptCore.h PATHS ${JSC_INCLUDE_DIR}) +FIND_PATH(HAS_JSC_JAVASCRIPT_H JavaScriptCore/JavaScript.h PATHS ${JSC_INCLUDE_DIR}) + FIND_LIBRARY(JSC_LIBRARY - NAMES JavaScriptCore javascriptcoregtk-1.0 javascriptcoregtk-3.0 + NAMES JavaScriptCore javascriptcoregtk-4.0 javascriptcoregtk-3.0 javascriptcoregtk-1.0 ) INCLUDE(FindPackageHandleStandardArgs) 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) |