summaryrefslogtreecommitdiffstats
path: root/contrib/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cmake')
-rw-r--r--contrib/cmake/FindJSC.cmake9
-rw-r--r--contrib/cmake/FindV8.cmake15
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)