Demos (master): Install shared libraries (if -DBUILD_SHARED_LIBS).
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Nov 24 14:23:18 UTC 2011
Module: Demos
Branch: master
Commit: fae1335e05505e7a7b22491e581e5d36cbda2f03
URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=fae1335e05505e7a7b22491e581e5d36cbda2f03
Author: Johannes Obermayr <johannesobermayr at gmx.de>
Date: Sat Nov 19 17:51:25 2011 +0100
Install shared libraries (if -DBUILD_SHARED_LIBS).
Signed-off-by: Jose Fonseca <jfonseca at hera>
---
CMakeLists.txt | 4 ++++
src/egl/eglut/CMakeLists.txt | 6 ++++++
src/util/CMakeLists.txt | 4 ++++
src/xdemos/CMakeLists.txt | 4 ++++
4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbb3359..d07215f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,6 +103,10 @@ endif (MSVC)
add_definitions(-DDEMOS_DATA_DIR=\"../data/\")
+if (BUILD_SHARED_LIBS AND NOT DEFINED LIBDIR)
+ set(LIBDIR lib)
+endif (BUILD_SHARED_LIBS AND NOT DEFINED LIBDIR)
+
add_subdirectory (src)
diff --git a/src/egl/eglut/CMakeLists.txt b/src/egl/eglut/CMakeLists.txt
index 45208d6..d86b59a 100644
--- a/src/egl/eglut/CMakeLists.txt
+++ b/src/egl/eglut/CMakeLists.txt
@@ -1,7 +1,13 @@
if(X11_FOUND)
add_library(eglut_x11 eglut.h eglut.c eglutint.h eglut_x11.c)
target_link_libraries(eglut_x11 ${EGL_egl_LIBRARY} ${X11_X11_LIB})
+ if (BUILD_SHARED_LIBS)
+ install (TARGETS eglut_x11 DESTINATION ${LIBDIR})
+ endif (BUILD_SHARED_LIBS)
endif(X11_FOUND)
add_library(eglut_screen eglut.h eglut.c eglutint.h eglut_screen.c)
target_link_libraries(eglut_screen ${EGL_egl_LIBRARY})
+if (BUILD_SHARED_LIBS)
+ install (TARGETS eglut_screen DESTINATION ${LIBDIR})
+endif (BUILD_SHARED_LIBS)
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
index a3ea7b4..0829034 100644
--- a/src/util/CMakeLists.txt
+++ b/src/util/CMakeLists.txt
@@ -11,3 +11,7 @@ add_library (util
showbuffer.c
trackball.c
)
+
+if (BUILD_SHARED_LIBS)
+ install (TARGETS util DESTINATION ${LIBDIR})
+endif (BUILD_SHARED_LIBS)
diff --git a/src/xdemos/CMakeLists.txt b/src/xdemos/CMakeLists.txt
index f60f682..ee8b12d 100644
--- a/src/xdemos/CMakeLists.txt
+++ b/src/xdemos/CMakeLists.txt
@@ -19,6 +19,10 @@ link_libraries (
add_library (pbutil pbutil.c)
+if (BUILD_SHARED_LIBS)
+ install (TARGETS pbutil DESTINATION ${LIBDIR})
+endif (BUILD_SHARED_LIBS)
+
set (subdir xdemos)
set (targets
More information about the mesa-commit
mailing list