From 7c593f366f3bd816f3965ee6b6046ae075942b60 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Fri, 25 Oct 2019 22:24:33 +0300 Subject: [PATCH] Fix compilation without CELX --- src/celestia/CMakeLists.txt | 10 ++++++---- src/celestia/celestiacore.cpp | 4 ++-- src/celestia/celestiacore.h | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/celestia/CMakeLists.txt b/src/celestia/CMakeLists.txt index ad0f1e2b..03324c95 100644 --- a/src/celestia/CMakeLists.txt +++ b/src/celestia/CMakeLists.txt @@ -34,10 +34,12 @@ elseif(_UNIX AND ENABLE_THEORA) ) endif() -add_library(celestia STATIC ${CELESTIA_SOURCES} - $ - $ - $) +set(SCRIPT_LIBS $ $) +if(ENABLE_CELX) + set(SCRIPT_LIBS ${SCRIPT_LIBS} $) +endif() + +add_library(celestia STATIC ${CELESTIA_SOURCES} ${SCRIPT_LIBS}) #[[ add_library(celestia SHARED ${CELESTIA_SOURCES}) diff --git a/src/celestia/celestiacore.cpp b/src/celestia/celestiacore.cpp index 6238c0c0..b0849848 100644 --- a/src/celestia/celestiacore.cpp +++ b/src/celestia/celestiacore.cpp @@ -146,7 +146,9 @@ CelestiaCore::CelestiaCore() : renderer(new Renderer()), timer(new Timer()), m_legacyPlugin(make_unique(this)), +#ifdef CELX m_luaPlugin(make_unique(this)), +#endif m_scriptMaps(make_shared()) { @@ -855,7 +857,6 @@ void CelestiaCore::keyUp(int key, int) shiftKeysPressed[key] = false; } -#ifdef CELX static string getKeyName(const char* c, int modifiers) { unsigned int length = strlen(c); @@ -873,7 +874,6 @@ static string getKeyName(const char* c, int modifiers) return string(c); } -#endif void CelestiaCore::charEntered(char c, int modifiers) { diff --git a/src/celestia/celestiacore.h b/src/celestia/celestiacore.h index fa130791..7a3e1097 100644 --- a/src/celestia/celestiacore.h +++ b/src/celestia/celestiacore.h @@ -399,7 +399,9 @@ class CelestiaCore // : public Watchable std::unique_ptr m_script; std::unique_ptr m_scriptHook; std::unique_ptr m_legacyPlugin; +#ifdef CELX std::unique_ptr m_luaPlugin; +#endif std::shared_ptr m_scriptMaps; enum ScriptState