diff options
| author | Tim Penhey <tim.penhey@canonical.com> | 2012-11-28 20:58:44 +1300 | 
|---|---|---|
| committer | Tim Penhey <tim.penhey@canonical.com> | 2012-11-28 20:58:44 +1300 | 
| commit | 0934d2bbf533357c3dcb6852a803bd2b16496ea1 (patch) | |
| tree | ab8bd1db3fafb6394f8ee5fd985aa3dd72025e54 | |
| parent | aeec3afb35e8551fc24a6e4de0a8c73f9dd0603d (diff) | |
Update the cmake lists.
(bzr r2791.9.47)
| -rw-r--r-- | launcher/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | plugins/unityshell/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | tests/mock-application.cpp | 2 | ||||
| -rw-r--r-- | tests/mock-application.h | 2 | ||||
| -rw-r--r-- | unity-shared/ApplicationManager.cpp | 15 | ||||
| -rw-r--r-- | unity-shared/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | unity-standalone/CMakeLists.txt | 1 | 
7 files changed, 28 insertions, 6 deletions
| diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 923aa8208..05803c40d 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -99,15 +99,21 @@ set (SWITCHER_SOURCES  add_library (switcher-lib STATIC ${SWITCHER_SOURCES})  add_dependencies (switcher-lib unity-core-${UNITY_API_VERSION} unity-shared) +set (LAUNCHER_LIBS + launcher-lib + unity-shared + unity-shared-bamf + unity-shared-standalone) +  #  # Standalone variant  #  add_executable (launcher StandaloneLauncher.cpp)  add_dependencies (launcher launcher-lib) -target_link_libraries (launcher launcher-lib unity-shared unity-shared-standalone) +target_link_libraries (launcher ${LAUNCHER_LIBS})  if (ENABLE_X_SUPPORT)  add_executable (switcher StandaloneSwitcher.cpp)  add_dependencies (switcher switcher-lib launcher-lib) - target_link_libraries (switcher switcher-lib launcher-lib unity-shared unity-shared-standalone) + target_link_libraries (switcher switcher-lib ${LAUNCHER_LIBS})  endif () diff --git a/plugins/unityshell/CMakeLists.txt b/plugins/unityshell/CMakeLists.txt index 36db0176c..d4d170ae2 100644 --- a/plugins/unityshell/CMakeLists.txt +++ b/plugins/unityshell/CMakeLists.txt @@ -11,7 +11,7 @@ compiz_plugin (unityshell  LIBDIRS "${CMAKE_BINARY_DIR}/UnityCore"  )  add_dependencies(unityshell unity-core-${UNITY_API_VERSION} dash-lib launcher-lib switcher-lib hud-lib panel-lib shortcuts-lib unity-shared unity-shared-compiz) -target_link_libraries(unityshell unity-core-${UNITY_API_VERSION} launcher-lib dash-lib switcher-lib hud-lib panel-lib shortcuts-lib unity-shared unity-shared-compiz) +target_link_libraries(unityshell unity-core-${UNITY_API_VERSION} launcher-lib dash-lib switcher-lib hud-lib panel-lib shortcuts-lib unity-shared unity-shared-bamf unity-shared-compiz)  set_target_properties(unityshell   PROPERTIES INSTALL_RPATH "${CACHED_UNITY_PRIVATE_DEPS_LIBRARY_DIRS}"  INSTALL_RPATH_USE_LINK_PATH TRUE) diff --git a/tests/mock-application.cpp b/tests/mock-application.cpp index 85fb53412..cb42243c4 100644 --- a/tests/mock-application.cpp +++ b/tests/mock-application.cpp @@ -26,7 +26,7 @@ namespace unity  // class, and uses link time to make sure there is a function available.  std::shared_ptr<ApplicationManager> create_application_manager()  { - return std::shared_ptr<ApplicationManager>(new MockApplicationManager>()); + return std::shared_ptr<ApplicationManager>(new testmocks::MockApplicationManager());  }  } diff --git a/tests/mock-application.h b/tests/mock-application.h index 354d0d3b0..86274d7ff 100644 --- a/tests/mock-application.h +++ b/tests/mock-application.h @@ -103,7 +103,7 @@ public:  bool GetUrgent() const { return urgent_; }  }; -class MockApplicationManager +class MockApplicationManager : public unity::ApplicationManager  {  public:  virtual unity::ApplicationWindowPtr GetActiveWindow() const diff --git a/unity-shared/ApplicationManager.cpp b/unity-shared/ApplicationManager.cpp index 401dab68f..8fe1a494b 100644 --- a/unity-shared/ApplicationManager.cpp +++ b/unity-shared/ApplicationManager.cpp @@ -19,6 +19,7 @@  #include "unity-shared/ApplicationManager.h" +#include "unity-shared/WindowManager.h"  namespace unity  { @@ -32,4 +33,18 @@ ApplicationManager& ApplicationManager::Default()  return *instance;  } + +namespace +{ +// This method is needed to create an unresolved external for the +// WindowManager::Default method. This is because it is highly likely that +// the application manager implementations need the window manager for some +// things, and in fact the bamf one does. In order to make the linker happy, +// we need to make sure that we have this here. +void dummy() +{ + WindowManager::Default(); +} +} +  } // namespace unity diff --git a/unity-shared/CMakeLists.txt b/unity-shared/CMakeLists.txt index 8d0881ca2..258d95292 100644 --- a/unity-shared/CMakeLists.txt +++ b/unity-shared/CMakeLists.txt @@ -75,7 +75,6 @@ set (UNITY_SHARED_SOURCES  if(ENABLE_X_SUPPORT)  set (UNITY_SHARED_SOURCES - BamfApplicationManager.cpp  XKeyboardUtil.cpp  XWindowManager.cpp  ${UNITY_SHARED_SOURCES} @@ -107,6 +106,7 @@ if (ENABLE_X_SUPPORT)  # bamf application manager  set (UNITY_SHARED_BAMF_SOURCES + BamfApplicationManager.cpp  BamfApplicationManagerFactory.cpp  )  add_library (unity-shared-bamf STATIC ${UNITY_SHARED_BAMF_SOURCES}) diff --git a/unity-standalone/CMakeLists.txt b/unity-standalone/CMakeLists.txt index f93784b10..e9e78b5cf 100644 --- a/unity-standalone/CMakeLists.txt +++ b/unity-standalone/CMakeLists.txt @@ -43,4 +43,5 @@ target_link_libraries (unity-standalone  launcher-lib  panel-lib  unity-shared + unity-shared-bamf  unity-shared-standalone) | 
