--- 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 -- 1.7.7 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev