#269 config.h is not properly populated with directories from CMake

GemRB Main Engine
cmake (1)
Lukas Jirkovsky

PLUGINDIR and SYSCONFDIR are not expanded at all in the config.h when doing fhs build. I'm pretty sure this worked before, because I never had to set the directories manually in the gemrb.cfg

application versions

  • gemrb 0.8.1
  • cmake 3.0.0


  • Jaka Kranjc
    Jaka Kranjc

    this is with git, not 0.8.1, right? I think you just need to rerun a clean cmake (delete CmakeCache and CMakeFiles).

  • This happened with 0.8.1 and a clean build. The parameters passed to cmake were following:


  • Jaka Kranjc
    Jaka Kranjc

    I don't think anything changed between .0 and .1, however it did get simplified/fixed afterwards — and it works here. We were using two pairs of constants, but not anymore. In the meanwhile, you can define PLUGIN_DIR and SYSCONF_DIR to work around it.

    Last edit: Jaka Kranjc 2014-06-22
  • Jaka Kranjc
    Jaka Kranjc

    Those two names are what is and will be used in the future too.

  • Jaka Kranjc
    Jaka Kranjc

    • status: open --> closed-fixed
  • I'm afraid it is still broken. Both PLUGIN_DIR and SYSCONF_DIR are defined according to the CMakeOutput:

    -- These are the configured paths:
    --   PREFIX: /usr
    --   LIB_DIR: /usr/lib/gemrb
    --   PLUGIN_DIR: /usr/lib/gemrb/plugins
    --   BIN_DIR: /usr/bin
    --   DATA_DIR: /usr/share/gemrb
    --   MAN_DIR: /usr/share/man/man6
    --   SYSCONF_DIR: /etc/gemrb
    --   DOC_DIR: /usr/share/doc/gemrb
    --   ICON_DIR: /usr/share/pixmaps
    --   SVG_DIR: /usr/share/icons/hicolor/scalable/apps
    --   MENU_DIR: /usr/share/applications
    -- Options:
    --   LAYOUT: fhs
    --   NOCOLOR: disabled
    --   STATIC_LINK: disabled
    --   INSOURCEBUILD: disabled
    --   DISABLE_WERROR: disabled
    --   WIN32_USE_STDIO: disabled
    --   USE_SDL2: disabled
    --   USE_OPENGL: disabled
    -- Build type: Release

    However the content of the config.h is the following:

    // automatically generated file from cmake!
    #define PACKAGE "gemrb"
    #define SIZEOF_INT 4
    #define SIZEOF_LONG_INT 8
    #define HAVE_STRNDUP 1
    /* #undef HAVE_STRLCPY */
    /* #undef PLUGINDIR */
    /* #undef DATADIR */
    /* #undef SYSCONFDIR */
    /* #undef NOCOLOR */
    /* #undef USE_OPENGL */
    /* #undef NOFPSLIMIT */
    #define HAVE_MALLOC_H 1
    #define HAVE_UNISTD_H 1
    /* #undef WIN32_USE_STDIO */
    /* #undef HAVE_ICONV */

    Notice that the PLUGINDIR and SYSCONFDIR are not set. As a result, the gemrb won't look into these directories by default when searching for its files in the gemrb/core/Interface.cpp.

  • Are you sure you're looking at the current git version? PLUGINDIR and SYSCONFDIR (without underscores) are no longer used there.