cmake: install python & node.js modules correctly
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -30,3 +30,7 @@ set_target_properties (maajs PROPERTIES
|
|||||||
PREFIX ""
|
PREFIX ""
|
||||||
SUFFIX ".node"
|
SUFFIX ".node"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/package.json
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/maajs.node
|
||||||
|
DESTINATION lib/node_modules/maajs)
|
||||||
|
|||||||
2
src/javascript/package.json
Normal file
2
src/javascript/package.json
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{ "name" : "maajs",
|
||||||
|
"main" : "./maajs.node" }
|
||||||
@@ -26,4 +26,13 @@ if (DOXYGEN_FOUND)
|
|||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# Essentially do seperate_arguments but with "." instead of " "
|
||||||
|
string (REPLACE "." ";" PYTHON_VERSION_LIST ${PYTHONLIBS_VERSION_STRING})
|
||||||
|
list (GET PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
|
||||||
|
list (GET PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
|
||||||
|
|
||||||
|
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/_pymaa.so
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/pymaa.py
|
||||||
|
DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/)
|
||||||
|
|
||||||
add_subdirectory (docs)
|
add_subdirectory (docs)
|
||||||
|
|||||||
Reference in New Issue
Block a user