cmake: fix build out of source tree

when there is only read access to sources.
This commit is contained in:
Boris Pek 2019-01-14 22:36:33 +03:00 committed by Jan Vidar Krey
parent d25fead3a8
commit b27c44e633
2 changed files with 3 additions and 4 deletions

2
.gitignore vendored
View File

@ -21,5 +21,3 @@ debian/uhub.postrm.debhelper
debian/uhub.prerm.debhelper debian/uhub.prerm.debhelper
debian/uhub.substvars debian/uhub.substvars
uhub-passwd uhub-passwd
src/version.h
src/system.h

View File

@ -77,6 +77,7 @@ check_symbol_exists(memmem string.h HAVE_MEMMEM)
check_symbol_exists(strndup string.h HAVE_STRNDUP) check_symbol_exists(strndup string.h HAVE_STRNDUP)
include_directories("${PROJECT_SOURCE_DIR}") include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${PROJECT_BINARY_DIR}")
include_directories(${SQLITE3_INCLUDE_DIRS}) include_directories(${SQLITE3_INCLUDE_DIRS})
link_directories(${SQLITE3_LIBRARY_DIRS}) link_directories(${SQLITE3_LIBRARY_DIRS})
@ -220,8 +221,8 @@ if (SYSTEMD_SUPPORT)
add_definitions(-DSYSTEMD) add_definitions(-DSYSTEMD)
endif() endif()
configure_file ("${PROJECT_SOURCE_DIR}/version.h.in" "${PROJECT_SOURCE_DIR}/version.h") configure_file ("${PROJECT_SOURCE_DIR}/version.h.in" "${PROJECT_BINARY_DIR}/version.h")
configure_file ("${PROJECT_SOURCE_DIR}/system.h.in" "${PROJECT_SOURCE_DIR}/system.h") configure_file ("${PROJECT_SOURCE_DIR}/system.h.in" "${PROJECT_BINARY_DIR}/system.h")
# mark_as_advanced(FORCE CMAKE_BUILD_TYPE) # mark_as_advanced(FORCE CMAKE_BUILD_TYPE)
# if (RELEASE) # if (RELEASE)