From 3813828dceea241608f8eb61996de1bfa4bfdab6 Mon Sep 17 00:00:00 2001 From: canape Date: Thu, 3 Jan 2013 10:25:08 +0100 Subject: [PATCH] regression with local directory and {LIB} directory --- cmake/Macro.cmake | 2 +- eo/src/ga/CMakeLists.txt | 5 +---- eo/tutorial/Lesson2/CMakeLists.txt | 6 +++--- eo/tutorial/Lesson3/CMakeLists.txt | 6 +++--- eo/tutorial/Lesson4/CMakeLists.txt | 6 +++--- eo/tutorial/Lesson5/CMakeLists.txt | 4 ++-- eo/tutorial/Lesson6/CMakeLists.txt | 4 ++-- 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/cmake/Macro.cmake b/cmake/Macro.cmake index b528e810a..018c439f9 100644 --- a/cmake/Macro.cmake +++ b/cmake/Macro.cmake @@ -30,7 +30,7 @@ macro(add_lesson module target files) elseif(${module} MATCHES smp) target_link_libraries(${i} smp eo eoutils) endif() - install(TARGETS ${i} RUNTIME DESTINATION ${INSTALL_BASE}/share${INSTALL_SUB_DIR}/${module}/tutorial/${target} COMPONENT examples) + install(TARGETS ${i} RUNTIME DESTINATION share${INSTALL_SUB_DIR}/${module}/tutorial/${target} COMPONENT examples) endforeach(i) # Custom target diff --git a/eo/src/ga/CMakeLists.txt b/eo/src/ga/CMakeLists.txt index a2ee1033b..1a1cd656d 100644 --- a/eo/src/ga/CMakeLists.txt +++ b/eo/src/ga/CMakeLists.txt @@ -23,10 +23,7 @@ set(GA_SOURCES ) add_library(ga STATIC ${GA_SOURCES}) -install(TARGETS ga ARCHIVE DESTINATION lib COMPONENT libraries) - -file(GLOB HDRS *.h) -install(FILES ${HDRS} DESTINATION include/eo/ga COMPONENT headers) +install(TARGETS ga ARCHIVE DESTINATION ${LIB} COMPONENT libraries) ###################################################################################### ### 3) Optionnal diff --git a/eo/tutorial/Lesson2/CMakeLists.txt b/eo/tutorial/Lesson2/CMakeLists.txt index 519e8a0e7..4021fc56d 100644 --- a/eo/tutorial/Lesson2/CMakeLists.txt +++ b/eo/tutorial/Lesson2/CMakeLists.txt @@ -53,8 +53,8 @@ target_link_libraries(exercise2.3 ga eo eoutils) ### 6) Configure project installation paths ###################################################################################### -install(TARGETS FirstBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) -install(TARGETS FirstRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) -install(TARGETS exercise2.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) +install(TARGETS FirstBitEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) +install(TARGETS FirstRealEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) +install(TARGETS exercise2.3 RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples) ###################################################################################### diff --git a/eo/tutorial/Lesson3/CMakeLists.txt b/eo/tutorial/Lesson3/CMakeLists.txt index d4d7563b2..e1e23a2f2 100644 --- a/eo/tutorial/Lesson3/CMakeLists.txt +++ b/eo/tutorial/Lesson3/CMakeLists.txt @@ -57,8 +57,8 @@ target_link_libraries(exercise3.1 ga eoutils eo) ### 6) Configure project installation paths ###################################################################################### -install(TARGETS SecondBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) -install(TARGETS SecondRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) -install(TARGETS exercise3.1 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) +install(TARGETS SecondBitEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) +install(TARGETS SecondRealEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) +install(TARGETS exercise3.1 RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples) ###################################################################################### diff --git a/eo/tutorial/Lesson4/CMakeLists.txt b/eo/tutorial/Lesson4/CMakeLists.txt index 5042796fe..858ff91d2 100644 --- a/eo/tutorial/Lesson4/CMakeLists.txt +++ b/eo/tutorial/Lesson4/CMakeLists.txt @@ -91,8 +91,8 @@ target_link_libraries(ESEA es ga eo eoutils) ### 6) Configure project installation paths ###################################################################################### -install(TARGETS BitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) -install(TARGETS RealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) -install(TARGETS ESEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) +install(TARGETS BitEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) +install(TARGETS RealEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) +install(TARGETS ESEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples) ###################################################################################### diff --git a/eo/tutorial/Lesson5/CMakeLists.txt b/eo/tutorial/Lesson5/CMakeLists.txt index 2987b041e..69130e265 100644 --- a/eo/tutorial/Lesson5/CMakeLists.txt +++ b/eo/tutorial/Lesson5/CMakeLists.txt @@ -50,7 +50,7 @@ target_link_libraries(OneMaxLibEA es ga eo eoutils) ### 6) Configure project installation paths ###################################################################################### -install(TARGETS OneMaxEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples) -install(TARGETS OneMaxLibEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples) +install(TARGETS OneMaxEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples) +install(TARGETS OneMaxLibEA RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples) ###################################################################################### diff --git a/eo/tutorial/Lesson6/CMakeLists.txt b/eo/tutorial/Lesson6/CMakeLists.txt index 2df16a459..8e852f92a 100644 --- a/eo/tutorial/Lesson6/CMakeLists.txt +++ b/eo/tutorial/Lesson6/CMakeLists.txt @@ -45,7 +45,7 @@ target_link_libraries(RealPSO eo eoutils) ### 6) Configure project installation paths ###################################################################################### -install(TARGETS BinaryPSO RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples) -install(TARGETS RealPSO RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples) +install(TARGETS BinaryPSO RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples) +install(TARGETS RealPSO RUNTIME DESTINATION share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples) ######################################################################################