Add the web/api folder to cmake
parent
0e2a164c08
commit
afd4e451fd
web
|
@ -1,5 +1,7 @@
|
|||
# CMakeLists.txt for the ZoneMinder web files
|
||||
|
||||
# Process the api subdirectory
|
||||
add_subdirectory(api)
|
||||
# Process the tools/mootools subdirectory
|
||||
add_subdirectory(tools/mootools)
|
||||
|
||||
|
@ -7,10 +9,16 @@ add_subdirectory(tools/mootools)
|
|||
configure_file(includes/config.php.in "${CMAKE_CURRENT_BINARY_DIR}/includes/config.php" @ONLY)
|
||||
|
||||
# Install the web files
|
||||
install(DIRECTORY ajax css graphics includes js lang skins tools views DESTINATION "${ZM_WEBDIR}" PATTERN "*.in" EXCLUDE PATTERN "*Make*" EXCLUDE PATTERN "*cmake*" EXCLUDE)
|
||||
install(DIRECTORY api ajax css graphics includes js lang skins tools views DESTINATION "${ZM_WEBDIR}" PATTERN "*.in" EXCLUDE PATTERN "*Make*" EXCLUDE PATTERN "*cmake*" EXCLUDE)
|
||||
install(FILES index.php DESTINATION "${ZM_WEBDIR}")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/includes/config.php" DESTINATION "${ZM_WEBDIR}/includes")
|
||||
|
||||
# Install the api config files (if its not in the source directory)
|
||||
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/api/app/Config/core.php" DESTINATION "${ZM_WEBDIR}/api/app/Config/core.php")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/api/app/Config/database.php" DESTINATION "${ZM_WEBDIR}/api/app/Config/database.php")
|
||||
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
|
||||
# Install the mootools symlinks (if its not in the source directory)
|
||||
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/mootools/mootools-core.js" DESTINATION "${ZM_WEBDIR}/tools/mootools")
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# CMakeLists.txt for the ZoneMinder web API files
|
||||
# The only purpose of this file is to configure the required files
|
||||
|
||||
# Generate random salt and seed for the API
|
||||
string(RANDOM LENGTH 40 ZM_API_SALT)
|
||||
string(RANDOM LENGTH 29 ALPHABET 0123456789 ZM_API_SEED)
|
||||
|
||||
# Configure database.php
|
||||
configure_file(app/Config/database.php.default "${CMAKE_CURRENT_BINARY_DIR}/app/Config/database.php" @ONLY)
|
||||
|
||||
# Configure core.php
|
||||
configure_file(app/Config/core.php.default "${CMAKE_CURRENT_BINARY_DIR}/app/Config/core.php" @ONLY)
|
|
@ -222,12 +222,12 @@
|
|||
/**
|
||||
* A random string used in security hashing methods.
|
||||
*/
|
||||
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
|
||||
Configure::write('Security.salt', '@ZM_API_SALT@');
|
||||
|
||||
/**
|
||||
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
||||
*/
|
||||
Configure::write('Security.cipherSeed', '76859309657453542496749683645');
|
||||
Configure::write('Security.cipherSeed', '@ZM_API_SEED@');
|
||||
|
||||
/**
|
||||
* Apply timestamps with the last modified time to static assets (js, css, images).
|
|
@ -67,10 +67,10 @@ class DATABASE_CONFIG {
|
|||
public $default = array(
|
||||
'datasource' => 'Database/Mysql',
|
||||
'persistent' => false,
|
||||
'host' => 'localhost',
|
||||
'login' => 'user',
|
||||
'password' => 'password',
|
||||
'database' => 'database_name',
|
||||
'host' => '@ZM_DB_HOST@',
|
||||
'login' => '@ZM_DB_USER@',
|
||||
'password' => '@ZM_DB_PASS@',
|
||||
'database' => '@ZM_DB_NAME@',
|
||||
'prefix' => '',
|
||||
//'encoding' => 'utf8',
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue