mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
0b2f6a0cf4
This achieves several goals: * Less reliance on scripts so we have better portability to Windows (though we still have a ways to go for proper Windows support). Luajit, luarocks, moonscript, and busted are all installed via CMake now. * Trying to make use of pkg-config to get the correct libraries. The latest libuv is still broken in this regard, but we'll at least be in a position to use it. * Allow the use of Ninja or make. The former runs faster in many environments, and automatically makes use of parallel builds. This also allows for system installed dependencies--though not through the Makefile just yet--and adds support for FreeBSD. This also make us build libuv and luajit as static libraries only, since we're only concerned about having static libraries for our bundled dependencies.
16 lines
605 B
CMake
16 lines
605 B
CMake
file(GLOB_RECURSE PRE_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} pre/*.h)
|
|
|
|
foreach(hfile ${PRE_HEADERS})
|
|
string(REGEX REPLACE ^pre/ post/ post_hfile ${hfile})
|
|
get_filename_component(hdir ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile} PATH)
|
|
file(MAKE_DIRECTORY ${hdir})
|
|
add_custom_command(
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile}
|
|
COMMAND ${CMAKE_C_COMPILER} -std=c99 -E -P
|
|
${CMAKE_CURRENT_SOURCE_DIR}/${hfile}
|
|
-o ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile})
|
|
list(APPEND POST_HEADERS ${post_hfile})
|
|
endforeach()
|
|
|
|
add_custom_target(unittest-headers DEPENDS ${POST_HEADERS})
|