CMake: true fix for #208, use NOTCURSES_SHARE

This commit is contained in:
nick black 2020-01-09 05:51:18 -05:00
parent 2c6765d18f
commit 1be4025289
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
4 changed files with 8 additions and 8 deletions

View File

@ -10,6 +10,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
include(GNUInstallDirs)
set(NOTCURSES_SHARE ${CMAKE_INSTALL_PREFIX}/share/notcurses)
option(DISABLE_FFMPEG "Disable FFmpeg image/video support" OFF)
@ -256,7 +257,6 @@ configure_file(tools/notcurses.pc.in
)
include(CMakePackageConfigHelpers)
configure_file(tools/version.h.in include/version.h)
configure_package_config_file(tools/notcursesConfig.cmake.in
@ -288,17 +288,17 @@ install(FILES
file(GLOB TESTDATA CONFIGURE_DEPENDS data/*)
install(FILES
${TESTDATA}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/notcurses
DESTINATION ${NOTCURSES_SHARE}
)
file(GLOB MANPAGES1 CONFIGURE_DEPENDS doc/man/man1/*.1)
install(FILES
${MANPAGES1}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
)
install(FILES
${MANPAGES3}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man3
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man3
)
install(TARGETS notcurses-demo DESTINATION bin)

View File

@ -19,9 +19,9 @@ setup(
platforms=["any"],
long_description=read('README.md'),
long_description_content_type="text/markdown",
setup_requires=["cffi"],
install_requires=["cffi>=1.0.0"],
setup_requires=["cffi>=1.0.0"],
cffi_modules=["src/notcurses/build_notcurses.py:ffibuild"],
install_requires=["cffi"],
py_modules=["notcurses"],
# see https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers=[

View File

@ -284,7 +284,7 @@ ext_demos(struct notcurses* nc, const char* demos){
// if it's NULL, there were valid options, but no spec.
static const char*
handle_opts(int argc, char** argv, notcurses_options* opts, bool* use_hud){
strcpy(datadir, CMAKE_INSTALL_SHARE);
strcpy(datadir, NOTCURSES_SHARE);
bool constant_seed = false;
int c;
*use_hud = false;

View File

@ -2,4 +2,4 @@
#define notcurses_VERSION_MINOR "@notcurses_VERSION_MINOR@"
#define notcurses_VERSION_PATCH "@notcurses_VERSION_PATCH@"
#cmakedefine DISABLE_FFMPEG
#define CMAKE_INSTALL_SHARE "@CMAKE_INSTALL_PREFIX@/share"
#define NOTCURSES_SHARE "@NOTCURSES_SHARE@"