diff options
author | Marc-André Moreau <marcandre.moreau@gmail.com> | 2011-11-26 05:19:58 +0400 |
---|---|---|
committer | Marc-André Moreau <marcandre.moreau@gmail.com> | 2011-11-26 05:19:58 +0400 |
commit | e70e044b8575f9273bee2e19a778bbda4b14d6db (patch) | |
tree | 39f33181f48c3c6085a52df75f194d20cb69cdea | |
parent | f229992cffc19e0abbab404e25ec8bf2dd66a986 (diff) |
cmake: build plugins as shared libraries
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | remmina-plugins-gnome/CMakeLists.txt | 1 | ||||
-rw-r--r-- | remmina-plugins/libvncserver/CMakeLists.txt | 2 | ||||
-rw-r--r-- | remmina-plugins/nx/CMakeLists.txt | 7 | ||||
-rw-r--r-- | remmina-plugins/rdp/CMakeLists.txt | 1 | ||||
-rw-r--r-- | remmina-plugins/telepathy/CMakeLists.txt | 1 | ||||
-rw-r--r-- | remmina-plugins/vnc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | remmina-plugins/xdmcp/CMakeLists.txt | 1 |
9 files changed, 19 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index fc3a4edd5..d46a7a3b2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.o *.lo *.la +*.so *.mo *.gmo *.swp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a00dbf1f..ad9a8acab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,8 +42,13 @@ if(NOT DEFINED CMAKE_INSTALL_BINDIR) set(CMAKE_INSTALL_BINDIR "bin") endif() +if(NOT BUILD_SHARED_LIBS) + set(BUILD_SHARED_LIBS ON) +endif() + if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") CHECK_C_COMPILER_FLAG(-Wno-unused-result Wno-unused-result) if(Wno-unused-result) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result") diff --git a/remmina-plugins-gnome/CMakeLists.txt b/remmina-plugins-gnome/CMakeLists.txt index 0c7c23f24..832416827 100644 --- a/remmina-plugins-gnome/CMakeLists.txt +++ b/remmina-plugins-gnome/CMakeLists.txt @@ -22,6 +22,7 @@ set(REMMINA_PLUGINS_GNOME_SRCS ) add_library(remmina-plugins-gnome ${REMMINA_PLUGINS_GNOME_SRCS}) +set_target_properties(remmina-plugins-gnome PROPERTIES PREFIX "") find_required_package(GTK3) if(GTK3_FOUND) diff --git a/remmina-plugins/libvncserver/CMakeLists.txt b/remmina-plugins/libvncserver/CMakeLists.txt index eeaf15a7e..ab5a23f81 100644 --- a/remmina-plugins/libvncserver/CMakeLists.txt +++ b/remmina-plugins/libvncserver/CMakeLists.txt @@ -38,7 +38,7 @@ set(REMMINA_VNC_CLIENT_SRCS libvncclient/zrle.c ) -add_library(vncclient ${REMMINA_VNC_CLIENT_SRCS}) +add_library(vncclient STATIC ${REMMINA_VNC_CLIENT_SRCS}) find_package(GTK3 REQUIRED) diff --git a/remmina-plugins/nx/CMakeLists.txt b/remmina-plugins/nx/CMakeLists.txt index c4402fa53..36b16a8b2 100644 --- a/remmina-plugins/nx/CMakeLists.txt +++ b/remmina-plugins/nx/CMakeLists.txt @@ -27,6 +27,7 @@ set(REMMINA_PLUGIN_NX_SRCS ) add_library(remmina-plugin-nx ${REMMINA_PLUGIN_NX_SRCS}) +set_target_properties(remmina-plugin-nx PROPERTIES PREFIX "") find_required_package(GTK3) if(GTK3_FOUND) @@ -34,5 +35,11 @@ if(GTK3_FOUND) target_link_libraries(remmina-plugin-nx ${GTK3_LIBRARY_DIRS}) endif() +find_required_package(XKBFILE) +if(XKBFILE_FOUND) + include_directories(${XKBFILE_INCLUDE_DIRS}) + target_link_libraries(remmina-plugin-nx ${XKBFILE_LIBRARY_DIRS}) +endif() + install(TARGETS remmina-plugin-nx DESTINATION ${REMMINA_PLUGINDIR}) diff --git a/remmina-plugins/rdp/CMakeLists.txt b/remmina-plugins/rdp/CMakeLists.txt index 2510536c2..9dec3968f 100644 --- a/remmina-plugins/rdp/CMakeLists.txt +++ b/remmina-plugins/rdp/CMakeLists.txt @@ -34,6 +34,7 @@ set(REMMINA_PLUGIN_RDP_SRCS ) add_library(remmina-plugin-rdp ${REMMINA_PLUGIN_RDP_SRCS}) +set_target_properties(remmina-plugin-rdp PROPERTIES PREFIX "") find_required_package(GTK3) if(GTK3_FOUND) diff --git a/remmina-plugins/telepathy/CMakeLists.txt b/remmina-plugins/telepathy/CMakeLists.txt index 5d6aba613..29d30f438 100644 --- a/remmina-plugins/telepathy/CMakeLists.txt +++ b/remmina-plugins/telepathy/CMakeLists.txt @@ -22,6 +22,7 @@ set(REMMINA_PLUGIN_TELEPATHY_SRCS ) add_library(remmina-plugin-telepathy ${REMMINA_PLUGIN_TELEPATHY_SRCS}) +set_target_properties(remmina-plugin-telepathy PROPERTIES PREFIX "") find_required_package(GTK3) diff --git a/remmina-plugins/vnc/CMakeLists.txt b/remmina-plugins/vnc/CMakeLists.txt index b5d161c27..6f5e3fc99 100644 --- a/remmina-plugins/vnc/CMakeLists.txt +++ b/remmina-plugins/vnc/CMakeLists.txt @@ -24,6 +24,7 @@ set(REMMINA_PLUGIN_VNC_SRCS ) add_library(remmina-plugin-vnc ${REMMINA_PLUGIN_VNC_SRCS}) +set_target_properties(remmina-plugin-vnc PROPERTIES PREFIX "") find_required_package(GTK3) if(GTK3_FOUND) diff --git a/remmina-plugins/xdmcp/CMakeLists.txt b/remmina-plugins/xdmcp/CMakeLists.txt index 224f2c372..bb8f4fa67 100644 --- a/remmina-plugins/xdmcp/CMakeLists.txt +++ b/remmina-plugins/xdmcp/CMakeLists.txt @@ -22,6 +22,7 @@ set(REMMINA_PLUGIN_XDMCP_SRCS ) add_library(remmina-plugin-xdmcp ${REMMINA_PLUGIN_XDMCP_SRCS}) +set_target_properties(remmina-plugin-xdmcp PROPERTIES PREFIX "") find_required_package(GTK3) if(GTK3_FOUND) |