neovim/third-party/cmake/GperfCMakeLists.txt
James McCoy 23c9e3ec1e
Raise minimum CMake version to 2.8.12 and remove compat code
2.8.12 is supported by our main CI targets and [repology] confirms that
this is broadly supported.

[repology]: https://repology.org/metapackage/cmake/information
2018-06-18 08:00:30 -04:00

31 lines
737 B
Plaintext

cmake_minimum_required(VERSION 2.8.12)
project(gperf LANGUAGES C CXX)
add_executable(gperf
lib/getline.cc
lib/hash.cc
lib/getopt.c
lib/getopt1.c
src/version.cc
src/positions.cc
src/options.cc
src/keyword.cc
src/keyword-list.cc
src/input.cc
src/bool-array.cc
src/hash-table.cc
src/search.cc
src/output.cc
src/main.cc)
include_directories(lib)
# Copy the config.h template without modifying it
# because none of the definitions are necessary
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/config.h.in ${CMAKE_BINARY_DIR}/config/config.h)
include_directories(${CMAKE_BINARY_DIR}/config)
include(GNUInstallDirs)
install(TARGETS gperf
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})