Fix computation of LUAJIT_INCLUDE_DIR
authordrepper@gmail.com <drepper@gmail.com>
Thu, 4 May 2017 18:57:40 +0000 (20:57 +0200)
committerdrepper@gmail.com <drepper@gmail.com>
Thu, 4 May 2017 18:57:40 +0000 (20:57 +0200)
I don't think the current way cmake uses to locate the correct lua.h
works.  Entries like "include/foo.h" cause cmake to look for a file
like "/usr/include/include/foo.h".  I.e., the include/ prefix for
all the entries is wrong as is adding "include" at the end.

This patch removes the prefix.  With it bcc finally compiles on
Fedora.

If this change causes a problem there is something seriously wrong
with cmake.

cmake/FindLuaJIT.cmake

index e4ee66dee724176522dbc0298f20ef9a6fca906b..5a2bcf85d83ecca056b5d45d320328f8a313939e 100644 (file)
@@ -31,7 +31,7 @@
 FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
   HINTS
   $ENV{LUAJIT_DIR}
-  PATH_SUFFIXES include/luajit-2.0 include/luajit2.0 include/luajit include/luajit-2.1 include
+  PATH_SUFFIXES luajit-2.0 luajit2.0 luajit luajit-2.1
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks