Merge branch 'master' into mysql2PDO
This commit is contained in:
commit
7989e8e980
|
@ -72,7 +72,7 @@ set(CMAKE_INSTALL_FULL_BINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
|
||||||
# Required for certain checks to work
|
# Required for certain checks to work
|
||||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h)
|
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
|
# Required for including headers from the this folder
|
||||||
include_directories("${CMAKE_SOURCE_DIR}")
|
include_directories("${CMAKE_BINARY_DIR}")
|
||||||
# This is required to enable searching in lib64 (if exists), do not change
|
# This is required to enable searching in lib64 (if exists), do not change
|
||||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
# CMakeLists.txt for the ZoneMinder perl module.
|
# CMakeLists.txt for the ZoneMinder perl module.
|
||||||
|
|
||||||
|
# If this is an out-of-source build, copy the files we need to the binary directory
|
||||||
|
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Changes" "${CMAKE_CURRENT_BINARY_DIR}/Changes")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.PL" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.PL")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/MANIFEST" "${CMAKE_CURRENT_BINARY_DIR}/MANIFEST")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/META.yml" "${CMAKE_CURRENT_BINARY_DIR}/META.yml")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/README" "${CMAKE_CURRENT_BINARY_DIR}/README")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/t" "${CMAKE_CURRENT_BINARY_DIR}/t")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/lib" "${CMAKE_CURRENT_BINARY_DIR}/lib")
|
||||||
|
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||||
|
|
||||||
# Create files from the .in files
|
# Create files from the .in files
|
||||||
configure_file(lib/ZoneMinder/Base.pm.in "${CMAKE_CURRENT_BINARY_DIR}/lib/ZoneMinder/Base.pm" @ONLY)
|
configure_file(lib/ZoneMinder/Base.pm.in "${CMAKE_CURRENT_BINARY_DIR}/lib/ZoneMinder/Base.pm" @ONLY)
|
||||||
configure_file(lib/ZoneMinder/Config.pm.in "${CMAKE_CURRENT_BINARY_DIR}/lib/ZoneMinder/Config.pm" @ONLY)
|
configure_file(lib/ZoneMinder/Config.pm.in "${CMAKE_CURRENT_BINARY_DIR}/lib/ZoneMinder/Config.pm" @ONLY)
|
||||||
|
@ -13,7 +24,7 @@ else(CMAKE_VERBOSE_MAKEFILE)
|
||||||
endif(CMAKE_VERBOSE_MAKEFILE)
|
endif(CMAKE_VERBOSE_MAKEFILE)
|
||||||
|
|
||||||
# Add build target for the perl modules
|
# Add build target for the perl modules
|
||||||
add_custom_target(zmperlmodules ALL perl Makefile.PL FIRST_MAKEFILE=MakefilePerl PREFIX="${CMAKE_CURRENT_BINARY_DIR}/output" LIB="${CMAKE_CURRENT_BINARY_DIR}/output/${ZM_PERL_SUBPREFIX}" INSTALLSITEMAN3DIR="${CMAKE_CURRENT_BINARY_DIR}/output/${CMAKE_INSTALL_MANDIR}/man3" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl COMMAND make --makefile=MakefilePerl pure_install WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Building ZoneMinder perl modules")
|
add_custom_target(zmperlmodules ALL perl Makefile.PL FIRST_MAKEFILE=MakefilePerl PREFIX="${CMAKE_CURRENT_BINARY_DIR}/output" LIB="${CMAKE_CURRENT_BINARY_DIR}/output/${ZM_PERL_SUBPREFIX}" INSTALLSITEMAN3DIR="${CMAKE_CURRENT_BINARY_DIR}/output/${CMAKE_INSTALL_MANDIR}/man3" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl COMMAND make --makefile=MakefilePerl pure_install COMMENT "Building ZoneMinder perl modules")
|
||||||
|
|
||||||
# Add install target for the perl modules
|
# Add install target for the perl modules
|
||||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
|
@ -42,7 +42,7 @@ while ( !feof($cfg) )
|
||||||
continue;
|
continue;
|
||||||
elseif ( preg_match( '/^\s*#/', $str ))
|
elseif ( preg_match( '/^\s*#/', $str ))
|
||||||
continue;
|
continue;
|
||||||
elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*(.+?)\s*$/', $str, $matches ))
|
elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*(.*?)\s*$/', $str, $matches ))
|
||||||
define( $matches[1], $matches[2] );
|
define( $matches[1], $matches[2] );
|
||||||
}
|
}
|
||||||
fclose( $cfg );
|
fclose( $cfg );
|
||||||
|
|
Loading…
Reference in New Issue