Skip to content

Commit

Permalink
cmake: Properly use library detection modules
Browse files Browse the repository at this point in the history
Instead of importing the `Find*.cmake` modules directly, place them in
the root `cmake/` folder and define it as a CMake Module path. This lets
us use the `find_package` builtin to require any given packages.
  • Loading branch information
vmg committed Apr 20, 2016
1 parent b236092 commit ff9ff5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ include(cmake/GetGitRevisionDescription.cmake)
include(cmake/version.cmake)
include(GNUInstallDirs)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

if(NOT PYTHON_ONLY)
find_package(BISON)
find_package(FLEX)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include(cmake/FindLuaJIT.cmake)
find_package(LuaJIT)

if (LUAJIT_LIBRARIES)
find_program(LUAJIT luajit)
Expand Down

0 comments on commit ff9ff5d

Please sign in to comment.