fix build outside of build directory

This commit is contained in:
Isaac Connor 2020-02-27 12:00:09 -05:00
parent 496fd6b15a
commit 01a2880100
2 changed files with 4 additions and 4 deletions

View File

@ -910,7 +910,7 @@ message(STATUS "Optional libraries not found:${optlibsnotfound}")
# Run ZM configuration generator # Run ZM configuration generator
message(STATUS "Running ZoneMinder configuration generator") message(STATUS "Running ZoneMinder configuration generator")
execute_process(COMMAND perl ./zmconfgen.pl RESULT_VARIABLE zmconfgen_result) execute_process(COMMAND perl ${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl RESULT_VARIABLE zmconfgen_result)
if(zmconfgen_result EQUAL 0) if(zmconfgen_result EQUAL 0)
message(STATUS message(STATUS
"ZoneMinder configuration generator completed successfully") "ZoneMinder configuration generator completed successfully")

View File

@ -25,13 +25,13 @@
# #
use strict; use strict;
use lib './scripts/ZoneMinder/lib'; use lib '@CMAKE_CURRENT_BINARY_DIR@/scripts/ZoneMinder/lib';
use ZoneMinder::ConfigData qw/:data/; use ZoneMinder::ConfigData qw/:data/;
$| = 1; $| = 1;
my $config_header = "src/zm_config_defines.h"; my $config_header = '@CMAKE_CURRENT_BINARY_DIR@/src/zm_config_defines.h';
my $config_sql = "db/zm_create.sql"; my $config_sql = '@CMAKE_CURRENT_BINARY_DIR@/db/zm_create.sql';
generateConfigFiles(); generateConfigFiles();