From d38dd2c53a368f14d5dcc5b50d208d7f97359753 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 27 Oct 2014 14:18:23 -0700 Subject: [PATCH] repairs for recursive source files, move HF meta events to SE --- cmake/macros/SetupHifiLibrary.cmake | 2 +- interface/CMakeLists.txt | 6 +----- interface/src/Application.cpp | 3 +-- interface/src/scripting/ControllerScriptingInterface.h | 2 +- .../src/AbstractControllerScriptingInterface.h | 3 +++ .../script-engine/src}/HFActionEvent.cpp | 0 .../events => libraries/script-engine/src}/HFActionEvent.h | 0 .../events => libraries/script-engine/src}/HFMetaEvent.cpp | 0 .../events => libraries/script-engine/src}/HFMetaEvent.h | 0 libraries/script-engine/src/ScriptEngine.cpp | 3 ++- 10 files changed, 9 insertions(+), 10 deletions(-) rename {interface/src/events => libraries/script-engine/src}/HFActionEvent.cpp (100%) rename {interface/src/events => libraries/script-engine/src}/HFActionEvent.h (100%) rename {interface/src/events => libraries/script-engine/src}/HFMetaEvent.cpp (100%) rename {interface/src/events => libraries/script-engine/src}/HFMetaEvent.h (100%) diff --git a/cmake/macros/SetupHifiLibrary.cmake b/cmake/macros/SetupHifiLibrary.cmake index 7bb85f68f5..950286ce45 100644 --- a/cmake/macros/SetupHifiLibrary.cmake +++ b/cmake/macros/SetupHifiLibrary.cmake @@ -12,7 +12,7 @@ macro(SETUP_HIFI_LIBRARY) project(${TARGET_NAME}) # grab the implemenation and header files - file(GLOB LIB_SRCS src/*.h src/*.cpp) + file(GLOB_RECURSE LIB_SRCS "src/*.h" "src/*.cpp") set(LIB_SRCS ${LIB_SRCS}) # create a library and set the property so it can be referenced later diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 0867f15ac8..c75d210103 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -44,11 +44,7 @@ configure_file(InterfaceConfig.h.in "${PROJECT_BINARY_DIR}/includes/InterfaceCon configure_file(InterfaceVersion.h.in "${PROJECT_BINARY_DIR}/includes/InterfaceVersion.h") # grab the implementation and header files from src dirs -file(GLOB INTERFACE_SRCS src/*.cpp src/*.h) -foreach(SUBDIR avatar devices events renderer ui starfield location scripting voxels particles entities gpu) - file(GLOB_RECURSE SUBDIR_SRCS src/${SUBDIR}/*.cpp src/${SUBDIR}/*.h) - set(INTERFACE_SRCS ${INTERFACE_SRCS} "${SUBDIR_SRCS}") -endforeach(SUBDIR) +file(GLOB_RECURSE INTERFACE_SRCS "src/*.cpp" "src/*.h") # Add SpeechRecognizer if on OS X, otherwise remove if (APPLE) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 91ff7c3563..81d8098002 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -77,8 +78,6 @@ #include "devices/OculusManager.h" #include "devices/TV3DManager.h" -#include "events/HFActionEvent.h" - #include "renderer/ProgramObject.h" #include "scripting/AccountScriptingInterface.h" diff --git a/interface/src/scripting/ControllerScriptingInterface.h b/interface/src/scripting/ControllerScriptingInterface.h index 62ef2e9b24..916c87d85c 100644 --- a/interface/src/scripting/ControllerScriptingInterface.h +++ b/interface/src/scripting/ControllerScriptingInterface.h @@ -46,7 +46,7 @@ private: signals: }; - + /// handles scripting of input controller commands from JS class ControllerScriptingInterface : public AbstractControllerScriptingInterface { diff --git a/libraries/script-engine/src/AbstractControllerScriptingInterface.h b/libraries/script-engine/src/AbstractControllerScriptingInterface.h index 78e36a3740..1e9647c5d5 100644 --- a/libraries/script-engine/src/AbstractControllerScriptingInterface.h +++ b/libraries/script-engine/src/AbstractControllerScriptingInterface.h @@ -88,6 +88,9 @@ public slots: signals: void keyPressEvent(const KeyEvent& event); void keyReleaseEvent(const KeyEvent& event); +// +// void actionStartEvent(const HFActionEvent& event); +// void actionEndEvent(const HFActionEvent& event); void mouseMoveEvent(const MouseEvent& event, unsigned int deviceID = 0); void mousePressEvent(const MouseEvent& event, unsigned int deviceID = 0); diff --git a/interface/src/events/HFActionEvent.cpp b/libraries/script-engine/src/HFActionEvent.cpp similarity index 100% rename from interface/src/events/HFActionEvent.cpp rename to libraries/script-engine/src/HFActionEvent.cpp diff --git a/interface/src/events/HFActionEvent.h b/libraries/script-engine/src/HFActionEvent.h similarity index 100% rename from interface/src/events/HFActionEvent.h rename to libraries/script-engine/src/HFActionEvent.h diff --git a/interface/src/events/HFMetaEvent.cpp b/libraries/script-engine/src/HFMetaEvent.cpp similarity index 100% rename from interface/src/events/HFMetaEvent.cpp rename to libraries/script-engine/src/HFMetaEvent.cpp diff --git a/interface/src/events/HFMetaEvent.h b/libraries/script-engine/src/HFMetaEvent.h similarity index 100% rename from interface/src/events/HFMetaEvent.h rename to libraries/script-engine/src/HFMetaEvent.h diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index 660a6ec560..3ccd0a74c3 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -36,12 +36,13 @@ #include "ArrayBufferViewClass.h" #include "DataViewClass.h" #include "MenuItemProperties.h" -#include "MIDIEvent.h" #include "LocalVoxels.h" #include "ScriptEngine.h" #include "TypedArrays.h" #include "XMLHttpRequestClass.h" +#include "MIDIEvent.h" + VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; EntityScriptingInterface ScriptEngine::_entityScriptingInterface;