Fix in-source build of MaxCtrl
The npm install command must generate the version.js file in order for the in-source builds to work.
This commit is contained in:
@ -4,7 +4,7 @@ if (BUILD_MAXCTRL)
|
||||
|
||||
if (NPM_FOUND AND NODEJS_FOUND AND NODEJS_VERSION VERSION_GREATER "6.0.0")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/version.js.in ${CMAKE_CURRENT_BINARY_DIR}/lib/version.js @ONLY)
|
||||
include(configure_version.cmake)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/maxctrl/maxctrl
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.sh ${CMAKE_SOURCE_DIR}
|
||||
|
2
maxctrl/configure_version.cmake
Normal file
2
maxctrl/configure_version.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
include(../VERSION22.cmake)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/version.js.in ${CMAKE_CURRENT_BINARY_DIR}/lib/version.js @ONLY)
|
@ -5,7 +5,8 @@
|
||||
"repository": "https://github.com/mariadb-corporation/MaxScale",
|
||||
"main": "maxctrl.js",
|
||||
"scripts": {
|
||||
"test": "nyc mocha --timeout 15000 --slow 10000"
|
||||
"test": "nyc mocha --timeout 15000 --slow 10000",
|
||||
"preinstall": "cmake -P configure_version.cmake"
|
||||
},
|
||||
"keywords": [
|
||||
"maxscale"
|
||||
|
Reference in New Issue
Block a user