superkaramba: added cmake rules for example files and build xcursor.so at build time. #45
Merged
MicheleC
merged 1 commits from superkaramba/examples-and-xcursor
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'superkaramba/examples-and-xcursor'
Deleting a branch is permanent. It CANNOT be undone. Continue?
As per title.
On deb distros, to be built with TDE/tde-packaging#167.
Here are some comments and suggestions for simplification.
check_include_file( "sys/types.h" HAVE_SYS_TYPES_H )
find_package( PythonInterp )
find_package( PythonLibs )
A handy trick here is to reverse the order of detection – first the library, then the interpreter.
In the current order, the default python interpreter is detected – which on older distributions will be Python2, and then the latest python library is detected, which will be Python3. The result for building
xcursor.so
is FTBFS.When the order is reversed, the python library detection causes the variables to be set so that the subsequent python interpreter detection returns the interpreter corresponding to the library.
In any case, the question here is whether interpreter detection will be needed – see another comment below.
Confirmed that detecting the python interpreter is no longer needed with new cmake building code.
INSTALL(
FILES API api.html README template.py test_all.sh
DESTINATION ${DATA_INSTALL_DIR}/superkaramba/examples/${_dir}
The variable
_dir
is not set here and therefore may contain an unknown value.We normally use lowercase
install
.No more applicable in new code.
endif( )
endif( )
install( FILES ${_file} DESTINATION ${DATA_INSTALL_DIR}/superkaramba/examples/${_curr_dir}${_subdir} )
endforeach()
Here are two things:
I suggest at the
examples
level to use theinstall
with the signature for folders:This should solve all the examples at once and avoid the need for
CMakeLists.txt
in each subdirectory.Good suggestion, thanks.
COMMAND ${PYTHON_EXECUTABLE} setup.py build
COMMAND find . -type f -name 'xcursor.*\.so' -exec cp {} xcursor.so "\;"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
I believe that instead of creating a custom command with a python call to build the module, we can use our standard CMake rules:
Because of this, there could be unnecessary detection of the Python interpreter added above.
Nice, this also solves the issue that with Python 3.12
distutils
would be removed."graph/graph.theme"
"image/image.theme"
"input_api/input_api.theme"
"input_example/input_example.theme"
Inconsistent indentation – tabs × spaces.
Fixed.
a7a4d432c4
to09d30bd11a
1 year agoNew version ready for another review.
It looks good. Unfortunately, I noticed another little thing – see the comment below.
#!/bin/sh
We should require
/bin/bash
instead of/bin/sh
, because the variable with the array is bashism, so it could report a syntax error if the default shell is different than bash.Another option, probably better, would be to avoid array:
Updated following option 2.
09d30bd11a
toeef19dd535
1 year agoNow everything looks good.
eef19dd535
into master 1 year agoReviewers
eef19dd535
.