Browse Source

[build] Fix build when using nested CMake

(FetchContent, ExternalProject_Add)

github: closes #102
tags/lighttpd-1.4.55
raw 5 months ago
parent
commit
2c409321df
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      CMakeLists.txt
  2. +3
    -3
      scripts/cmake/LighttpdMacros.cmake

+ 1
- 1
CMakeLists.txt View File

@@ -2,7 +2,7 @@ project(lighttpd C)

cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR)

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

include(CTest)



+ 3
- 3
scripts/cmake/LighttpdMacros.cmake View File

@@ -25,9 +25,9 @@ endmacro(ADD_AND_INSTALL_LIBRARY)
macro(LEMON_PARSER SRCFILE)
get_filename_component(SRCBASE ${SRCFILE} NAME_WE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SRCBASE}.c ${CMAKE_CURRENT_BINARY_DIR}/${SRCBASE}.h
COMMAND ${CMAKE_BINARY_DIR}/build/lemon
ARGS -q ${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} ${CMAKE_SOURCE_DIR}/src/lempar.c
DEPENDS ${CMAKE_BINARY_DIR}/build/lemon ${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} ${CMAKE_SOURCE_DIR}/src/lempar.c
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/lemon
ARGS -q ${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lemon ${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c
COMMENT "Generating ${SRCBASE}.c from ${SRCFILE}"
)
endmacro(LEMON_PARSER)


Loading…
Cancel
Save