summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindV8.cmake49
1 files changed, 49 insertions, 0 deletions
diff --git a/cmake/FindV8.cmake b/cmake/FindV8.cmake
new file mode 100644
index 000000000..c9522bd7b
--- /dev/null
+++ b/cmake/FindV8.cmake
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2015 Sébastien Helleu <flashcode@flashtux.org>
+#
+# This file is part of WeeChat, the extensible chat client.
+#
+# WeeChat is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# WeeChat is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# - Find Aspell
+# This module finds if libaspell is installed and determines where
+# the include files and libraries are.
+#
+# This code sets the following variables:
+#
+# V8_INCLUDE_DIR = path to where v8.h can be found
+# V8_LIBRARY = path to where libv8.so* can be found
+
+if(V8_FOUND)
+ # Already in cache, be silent
+ SET(V8_FIND_QUIETLY TRUE)
+endif()
+
+set(V8_INC_PATHS
+ /usr/include
+ ${CMAKE_INCLUDE_PATH}
+)
+find_path(V8_INCLUDE_DIR v8.h PATHS ${V8_INC_PATHS})
+find_library(V8_LIBRARY
+ NAMES v8
+ PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
+)
+
+find_package_handle_standard_args(V8 DEFAULT_MSG V8_LIBRARY V8_INCLUDE_DIR)
+
+mark_as_advanced(
+ V8_INCLUDE_DIR
+ V8_LIBRARY
+)