mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +00:00
1b3c67ee1f
Lemon's post build command aborts configuration step after CMake version bump to 3.1.0 in ba618d308c
When CMake version was 2.8.7 the same command produced a warning
CMake Error at tools/lemon/CMakeLists.txt:11 (add_custom_command):
TARGET 'lemon' is IMPORTED and does not build here.
14 lines
476 B
CMake
14 lines
476 B
CMake
cmake_minimum_required( VERSION 3.1.0 )
|
|
|
|
if( NOT CMAKE_CROSSCOMPILING )
|
|
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
|
|
|
|
add_executable( lemon lemon.c )
|
|
set( CROSS_EXPORTS ${CROSS_EXPORTS} lemon PARENT_SCOPE )
|
|
|
|
# Lemon wants lempar.c in its directory
|
|
add_custom_command( TARGET lemon
|
|
POST_BUILD
|
|
COMMAND echo $<TARGET_FILE_DIR:lemon>
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c $<TARGET_FILE_DIR:lemon> )
|
|
endif()
|