CMAKE: configure_file for engine_config.h after src/ dir was added

... their contribution to variables were ignored
master
Martin Gerhardy 2018-11-26 07:20:08 +01:00
parent 78f61b89c4
commit 1155c84daa
2 changed files with 7 additions and 5 deletions

View File

@ -181,8 +181,6 @@ find_host_program(GIT_EXECUTABLE NAMES ${GIT_BINARY} git)
find_host_program(HG_EXECUTABLE NAMES ${HG_BINARY} hg)
check_include_files("uuid/uuid.h" HAVE_UUID_H)
configure_file(src/engine-config.h.in engine-config.h @ONLY)
message(STATUS "Generate config.h in ${CMAKE_CURRENT_BINARY_DIR}")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# These includes are needed to let the include for IMPLICIT_DEPENDS for shaders work
@ -218,6 +216,9 @@ if (UNITTESTS)
endif()
endif()
configure_file(src/engine-config.h.in engine-config.h @ONLY)
message(STATUS "Generate config.h in ${CMAKE_CURRENT_BINARY_DIR}")
find_package(Doxygen)
if (DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

View File

@ -27,9 +27,6 @@ set(SRCS
set(PostgreSQL_ADDITIONAL_VERSIONS "10;10.4;11")
find_package(PostgreSQL)
message(STATUS "Postgresql include dirs: ${PostgreSQL_INCLUDE_DIRS}")
message(STATUS "Postgresql libs: ${PostgreSQL_LIBRARIES}")
message(STATUS "Postgresql found: ${PostgreSQL_FOUND}")
set(LIB persistence)
engine_add_module(TARGET ${LIB} SRCS ${SRCS} DEPENDENCIES core)
@ -54,6 +51,10 @@ else()
endif()
set(HAVE_POSTGRES ${PostgreSQL_FOUND} CACHE BOOL "Found postgres" FORCE)
message(STATUS "Postgresql include dirs: ${PostgreSQL_INCLUDE_DIRS}")
message(STATUS "Postgresql libs: ${PostgreSQL_LIBRARIES}")
message(STATUS "Postgresql found: ${HAVE_POSTGRES}")
generate_db_models(${LIB} ${CMAKE_CURRENT_SOURCE_DIR}/tables.tbl PersistenceModels.h)
if (TESTS)