From 929ef38deef26fb218e994f1044da562e34d8acc Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Tue, 13 Sep 2011 17:41:51 +0200
Subject: [PATCH] ENH: fix installation

---
 Code/Wrappers/ApplicationLauncherQt/CMakeLists.txt | 11 +++++------
 Code/Wrappers/CommandLine/CMakeLists.txt           | 13 +++++--------
 Code/Wrappers/QtWidget/CMakeLists.txt              | 12 ++++--------
 3 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/Code/Wrappers/ApplicationLauncherQt/CMakeLists.txt b/Code/Wrappers/ApplicationLauncherQt/CMakeLists.txt
index 7a5a4a1b18..f608da8a55 100644
--- a/Code/Wrappers/ApplicationLauncherQt/CMakeLists.txt
+++ b/Code/Wrappers/ApplicationLauncherQt/CMakeLists.txt
@@ -8,11 +8,10 @@ add_executable(otbApplicationLauncherQt ${SRCS})
 
 target_link_libraries(otbApplicationLauncherQt
                        OTBWrapperQtWidget
-                       OTBWrapperCore
+                       OTBApplicationEngine
                        ${QT_LIBRARIES})
-
+                       
 install(TARGETS otbApplicationLauncherQt
-        RUNTIME DESTINATION bin
-        LIBRARY DESTINATION lib
-        ARCHIVE DESTINATION lib/static)
-                       
\ No newline at end of file
+        RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24}
+        LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24}
+        ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24})
diff --git a/Code/Wrappers/CommandLine/CMakeLists.txt b/Code/Wrappers/CommandLine/CMakeLists.txt
index 1c3ff348cb..27a010cc01 100644
--- a/Code/Wrappers/CommandLine/CMakeLists.txt
+++ b/Code/Wrappers/CommandLine/CMakeLists.txt
@@ -1,12 +1,9 @@
 file(GLOB srcs "*.cxx")
 
 add_library(OTBWrapperCommandLine ${srcs})
-target_link_libraries(OTBWrapperCommandLine OTBWrapperCore) #OTBCommon OTBIO)
-install(TARGETS OTBWrapperCommandLine
-        RUNTIME DESTINATION bin
-        LIBRARY DESTINATION lib
-        ARCHIVE DESTINATION lib/static)
+target_link_libraries(OTBWrapperCommandLine OTBApplicationEngine)
 
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include/otbapp
-        FILES_MATCHING PATTERN "*.h")
-                       
\ No newline at end of file
+install(TARGETS OTBWrapperCommandLine
+        RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24}
+        LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24}
+        ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24})
diff --git a/Code/Wrappers/QtWidget/CMakeLists.txt b/Code/Wrappers/QtWidget/CMakeLists.txt
index b8b447bc24..beffa58cfa 100644
--- a/Code/Wrappers/QtWidget/CMakeLists.txt
+++ b/Code/Wrappers/QtWidget/CMakeLists.txt
@@ -21,13 +21,9 @@ set( WrappersQtWidget_MOC_HDR
 QT4_WRAP_CPP(WrappersQtWidget_MOC_SRC ${WrappersQtWidget_MOC_HDR})
 
 add_library(OTBWrapperQtWidget ${srcs} ${WrappersQtWidget_MOC_SRC})
-target_link_libraries(OTBWrapperQtWidget OTBCommon OTBIO OTBWrapperCore OTBWrapperCommon ${QT_LIBRARIES})
+target_link_libraries(OTBWrapperQtWidget OTBApplicationEngine ${QT_LIBRARIES})
 
 install(TARGETS OTBWrapperQtWidget
-        RUNTIME DESTINATION bin
-        LIBRARY DESTINATION lib
-        ARCHIVE DESTINATION lib/static)
- 
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include/otbapp
-        FILES_MATCHING PATTERN "*.h")
- 
\ No newline at end of file
+        RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR_CM24}
+        LIBRARY DESTINATION ${OTB_INSTALL_LIB_DIR_CM24}
+        ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR_CM24})
-- 
GitLab