[asterisk-scf-commits] asterisk-scf/release/slice-plugins.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jan 26 10:33:17 CST 2011


branch "master" has been updated
       via  e7f71fc1ca973439cd1fc336ac4709db49403ab6 (commit)
      from  a394b2635a80ec0431b226816fcf7ea388c542f6 (commit)

Summary of changes:
 CMakeLists.txt     |   12 +++++++++++-
 src/CMakeLists.txt |    2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit e7f71fc1ca973439cd1fc336ac4709db49403ab6
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Jan 26 10:33:13 2011 -0600

    Choose installation directory properly for Windows and non-Windows platforms.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9b281b..511d3db 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,6 +45,16 @@ find_package(Ice 3.4 REQUIRED IceUtil Slice)
 
 include_directories("${ICE_INCLUDE_DIR}")
 
-set(CMAKE_INSTALL_PREFIX ${ICE_DIR})
+if(WIN32)
+  find_program(SLICE_COMPILER slice2cpp PATHS "${ICE_DIR}/bin" NO_DEFAULT_PATH)
+  if(NOT SLICE_COMPILER)
+    message(FATAL_ERROR "Unable to locate slice2cpp in ${ICE_DIR}; slice-plugins need to be installed alongside slice2cpp.")
+  endif()
+  get_filename_component(SLICE_PLUGINS_DIR "${SLICE_COMPILER}" PATH)
+else()
+  get_filename_component(SLICE_PLUGINS_DIR "${ICE_SLICE_LIBRARY_RELEASE}" PATH)
+endif()
+
+message(STATUS "Will install into ${SLICE_PLUGINS_DIR}")
 
 add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9dfa4e2..788343c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,3 @@
 add_library(SliceVisitorPattern MODULE SliceVisitorPattern.cpp)
 target_link_libraries(SliceVisitorPattern ${ICE_ICEUTIL_LIBRARY} ${ICE_SLICE_LIBRARY})
-install(TARGETS SliceVisitorPattern LIBRARY DESTINATION bin RUNTIME DESTINATION bin)
+install(TARGETS SliceVisitorPattern LIBRARY DESTINATION "${SLICE_PLUGINS_DIR}" RUNTIME DESTINATION "${SLICE_PLUGINS_DIR}")

-----------------------------------------------------------------------


-- 
asterisk-scf/release/slice-plugins.git



More information about the asterisk-scf-commits mailing list