diff --git a/.gitignore b/.gitignore index e7ae9ceab..e617d937c 100644 --- a/.gitignore +++ b/.gitignore @@ -120,8 +120,6 @@ src/CMakeFiles/ src/cmake_install.cmake src/libzm.a src/nph-zms -src/zm_config_data.h -src/zm_config_defines.h src/zmc src/zmf src/zms @@ -154,4 +152,6 @@ web/undef.log zm.conf zmconfgen.pl zmlinkcontent.sh +zm_config_data.h +zm_config_defines.h **/.DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt index 76c48f530..c5007b396 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,8 +236,6 @@ endif() # Required for certain checks to work set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h) -# Required for including headers from the this folder -include_directories("${CMAKE_BINARY_DIR}") # This is required to enable searching in lib64 (if exists), do not change set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON) diff --git a/distros/ubuntu1504_cmake_split_packages/rules b/distros/ubuntu1504_cmake_split_packages/rules index 4c7164c48..4cf1e0c58 100755 --- a/distros/ubuntu1504_cmake_split_packages/rules +++ b/distros/ubuntu1504_cmake_split_packages/rules @@ -72,7 +72,7 @@ override_dh_auto_test: override_dh_clean: # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) distclean - dh_clean src/zm_config_defines.h + dh_clean zm_config_defines.h # # Delete remaining auto-generated Makefile if Makefile.in exists find $(CURDIR)/ -type f -name "Makefile" | while read file; do \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 37b08ad58..d9c4d92fd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ # CMakeLists.txt for the ZoneMinder binaries # Create files from the .in files -configure_file(zm_config_data.h.in "${CMAKE_CURRENT_BINARY_DIR}/zm_config_data.h" @ONLY) +configure_file(zm_config_data.h.in "${CMAKE_BINARY_DIR}/zm_config_data.h" @ONLY) # Group together all the source files that are used by all the binaries (zmc, zmu, zms etc) set(ZM_BIN_SRC_FILES @@ -74,6 +74,7 @@ add_library(zm STATIC ${ZM_BIN_SRC_FILES}) target_include_directories(zm PUBLIC + ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(zm diff --git a/zmconfgen.pl.in b/zmconfgen.pl.in index d3f165651..0674d7183 100644 --- a/zmconfgen.pl.in +++ b/zmconfgen.pl.in @@ -30,7 +30,7 @@ use ZoneMinder::ConfigData qw/:data/; $| = 1; -my $config_header = '@CMAKE_CURRENT_BINARY_DIR@/src/zm_config_defines.h'; +my $config_header = '@CMAKE_BINARY_DIR@/zm_config_defines.h'; my $config_sql = '@CMAKE_CURRENT_BINARY_DIR@/db/zm_create.sql'; generateConfigFiles();