diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-04-06 22:17:39 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-04-06 22:17:39 +0200 |
commit | 5e52f10edf41ecf464037ac381413042f09fe27f (patch) | |
tree | e25b520f403587c413f1d832aba3a5df066727e6 | |
parent | 62496c3c676d0b8d34452f60d5a666eb40d9ae6a (diff) | |
download | pcitool-5e52f10edf41ecf464037ac381413042f09fe27f.tar.gz pcitool-5e52f10edf41ecf464037ac381413042f09fe27f.tar.bz2 pcitool-5e52f10edf41ecf464037ac381413042f09fe27f.tar.xz pcitool-5e52f10edf41ecf464037ac381413042f09fe27f.zip |
Fix building of driver if pcilib is built out-of-source
-rw-r--r-- | CMakeLists.txt | 22 | ||||
-rw-r--r-- | driver/Makefile.in (renamed from driver/Makefile) | 3 |
2 files changed, 14 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ef7d21d..f956d3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,7 +163,8 @@ if (${RELEASE} GREATER 0) else (${RELEASE} GREATER 0) set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION}") endif (${RELEASE} GREATER 0) -set(CPACK_SOURCE_IGNORE_FILES "/build/;/.bzr/;CMakeFiles;_CPack_Packages;cmake_install.cmake;CPack.*.cmake;CMakeCache.txt;install_manifest.txt;common.mk;pcilib/config.h$;.pc$;/([^d]|d[^r])[^/]*/Makefile;__pycache__;.pyc$;.tar.bz2$;~$;${CPACK_SOURCE_IGNORE_FILES}") +#set(CPACK_SOURCE_IGNORE_FILES "([^d]|d[^r])[^/]*/Makefile;${CPACK_SOURCE_IGNORE_FILES}") +set(CPACK_SOURCE_IGNORE_FILES "/build/;/.bzr/;CMakeFiles;_CPack_Packages;cmake_install.cmake;CPack.*.cmake;CMakeCache.txt;install_manifest.txt;common.mk;pcilib/config.h$;.pc$;Makefile$;__pycache__;.pyc$;.tar.bz2$;~$;${CPACK_SOURCE_IGNORE_FILES}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}") include(CPack) @@ -204,16 +205,17 @@ if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) ) endif(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcitool.spec.in ${CMAKE_CURRENT_BINARY_DIR}/pcitool.spec) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/misc/dkms.conf.in ${CMAKE_CURRENT_BINARY_DIR}/misc/dkms.conf) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/misc/pcitool.pc.in ${CMAKE_CURRENT_BINARY_DIR}/misc/pcitool.pc) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcilib/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/pcilib/config.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcilib/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/pcilib/version.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/docs/Doxyfile) +configure_file(${CMAKE_SOURCE_DIR}/driver/Makefile.in ${CMAKE_SOURCE_DIR}/driver/Makefile) +configure_file(${CMAKE_SOURCE_DIR}/pcitool.spec.in ${CMAKE_BINARY_DIR}/pcitool.spec) +configure_file(${CMAKE_SOURCE_DIR}/misc/dkms.conf.in ${CMAKE_BINARY_DIR}/misc/dkms.conf) +configure_file(${CMAKE_SOURCE_DIR}/misc/pcitool.pc.in ${CMAKE_BINARY_DIR}/misc/pcitool.pc) +configure_file(${CMAKE_SOURCE_DIR}/pcilib/config.h.in ${CMAKE_BINARY_DIR}/pcilib/config.h) +configure_file(${CMAKE_SOURCE_DIR}/pcilib/version.h.in ${CMAKE_BINARY_DIR}/pcilib/version.h) +configure_file(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in ${CMAKE_BINARY_DIR}/docs/Doxyfile) if (NOT DISABLE_SERVERS) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/misc/pcilib_api.service.in ${CMAKE_CURRENT_BINARY_DIR}/misc/pcilib_api.service) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/misc/pcilib_html.service.in ${CMAKE_CURRENT_BINARY_DIR}/misc/pcilib_html.service) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/misc/pcilib.sysconfig.in ${CMAKE_CURRENT_BINARY_DIR}/misc/pcilib.sysconfig) + configure_file(${CMAKE_SOURCE_DIR}/misc/pcilib_api.service.in ${CMAKE_BINARY_DIR}/misc/pcilib_api.service) + configure_file(${CMAKE_SOURCE_DIR}/misc/pcilib_html.service.in ${CMAKE_BINARY_DIR}/misc/pcilib_html.service) + configure_file(${CMAKE_SOURCE_DIR}/misc/pcilib.sysconfig.in ${CMAKE_BINARY_DIR}/misc/pcilib.sysconfig) endif (NOT DISABLE_SERVERS) PYTHON_CLEAN_LIST("${CMAKE_BINARY_DIR}/xml" XML_PY_FILES) diff --git a/driver/Makefile b/driver/Makefile.in index f932693..eea5a7b 100644 --- a/driver/Makefile +++ b/driver/Makefile.in @@ -10,7 +10,8 @@ MAININSTALLDIR ?= /lib/modules/$(KERNELVER)/kernel/extra HEADERDIR ?= /lib/modules/$(KERNELVER)/source/include PWD := $(shell pwd) -EXTRA_CFLAGS += -I$(M)/.. +#EXTRA_CFLAGS += -I$(M)/.. +EXTRA_CFLAGS += -I${CMAKE_BINARY_DIR}/driver ifdef DUMMY_DEVICE ifneq ($(DUMMY_DEVICE), 0) |