From 8120e03448d7547167fdced4351a91b07a27f72f Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Fri, 5 Nov 2010 16:00:33 +0000 Subject: [PATCH] modifications for coherent installation --- CMakeLists.txt | 1 + appli/TestWxGimmickReaderDialog/CMakeLists.txt | 10 +++++----- appli/TestWxSimpleView/CMakeLists.txt | 10 +++++----- src/CMakeLists.txt | 4 ++-- src/creaImageIOGimmick.cpp | 16 ++++++++-------- src/creaImageIOSettings.cpp | 2 +- src/creaImageIOWxTreeView.cpp | 4 ++-- 7 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b23075b..24ab59e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ IF (crea_FOUND) ENDIF(crea_FOUND) +message("link directory ${GDCM_INCLUDE_DIR}") SET(USE_GDCM_VTK ON) diff --git a/appli/TestWxGimmickReaderDialog/CMakeLists.txt b/appli/TestWxGimmickReaderDialog/CMakeLists.txt index b24e87f..33f48ec 100644 --- a/appli/TestWxGimmickReaderDialog/CMakeLists.txt +++ b/appli/TestWxGimmickReaderDialog/CMakeLists.txt @@ -1,11 +1,11 @@ IF(WIN32) - ADD_EXECUTABLE(TestWxGimmickReaderDialog WIN32 main) - SET_TARGET_PROPERTIES(TestWxGimmickReaderDialog PROPERTIES LINK_FLAGS /subsystem:console ) + ADD_EXECUTABLE(creaImageIOApp WIN32 main) + SET_TARGET_PROPERTIES(creaImageIOApp PROPERTIES LINK_FLAGS /subsystem:console ) ELSE(WIN32) - ADD_EXECUTABLE(TestWxGimmickReaderDialog MACOSX_BUNDLE main) + ADD_EXECUTABLE(creaImageIOApp MACOSX_BUNDLE main) ENDIF(WIN32) -TARGET_LINK_LIBRARIES( TestWxGimmickReaderDialog creaImageIO ) +TARGET_LINK_LIBRARIES( creaImageIOApp creaImageIO ) -INSTALL_TARGETS(/bin/ TestWxGimmickReaderDialog ) +INSTALL_TARGETS(/bin/ creaImageIOApp ) diff --git a/appli/TestWxSimpleView/CMakeLists.txt b/appli/TestWxSimpleView/CMakeLists.txt index 14c7f48..01b7662 100644 --- a/appli/TestWxSimpleView/CMakeLists.txt +++ b/appli/TestWxSimpleView/CMakeLists.txt @@ -1,11 +1,11 @@ IF(WIN32) - ADD_EXECUTABLE(TestWxSimpleDlg WIN32 main) - SET_TARGET_PROPERTIES(TestWxSimpleDlg PROPERTIES LINK_FLAGS /subsystem:console ) + ADD_EXECUTABLE(creaGimmickApp WIN32 main) + SET_TARGET_PROPERTIES(creaGimmickApp PROPERTIES LINK_FLAGS /subsystem:console ) ELSE(WIN32) - ADD_EXECUTABLE(TestWxSimpleDlg MACOSX_BUNDLE main) + ADD_EXECUTABLE(creaGimmickApp MACOSX_BUNDLE main) ENDIF(WIN32) -TARGET_LINK_LIBRARIES( TestWxSimpleDlg creaImageIO ) +TARGET_LINK_LIBRARIES( creaGimmickApp creaImageIO ) -INSTALL_TARGETS(/bin/ TestWxSimpleDlg ) +INSTALL_TARGETS(/bin/ creaGimmickApp ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 19f2124..fdc5e1e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -310,10 +310,10 @@ SET(${LIBRARY_NAME}_ADDITIONAL_USE_FILE CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME}) IF (WIN32) SET(INPUT_DATA_DIR ${PROJECT_SOURCE_DIR}/src/data) - SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/bin/share/gimmick) + SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/bin/share/creaImageIO) ELSE (WIN32) SET(INPUT_DATA_DIR ${PROJECT_SOURCE_DIR}/src/data) - SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/share/gimmick) + SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/share/creaImageIO) ENDIF (WIN32) CREA_CPDIR(${INPUT_DATA_DIR} ${OUTPUT_DATA_DIR}) diff --git a/src/creaImageIOGimmick.cpp b/src/creaImageIOGimmick.cpp index 806cd6b..c473a33 100644 --- a/src/creaImageIOGimmick.cpp +++ b/src/creaImageIOGimmick.cpp @@ -62,14 +62,14 @@ namespace creaImageIO CreateUserSettingsDirectory(); // Sets the current directory to the home dir mCurrentDirectory = GetHomeDirectory(); - mSynchronizer= new Synchronizer(GetUserSettingsDirectory()+"share/gimmick/"); + mSynchronizer= new Synchronizer(GetUserSettingsDirectory()+"share/creaImageIO/"); mSettings = new Settings(mCurrentDirectory); std::string dbpath = GetLocalDatabasePath(); // Create or open local database - std::string dpath= mCurrentDirectory + "/.gimmick/share/gimmick/" + mLocalDescpName; + std::string dpath= mCurrentDirectory + "/.creaImageIO/share/creaImageIO/" + mLocalDescpName; boost::algorithm::replace_all( dpath, INVALID_FILE_SEPARATOR , @@ -186,7 +186,7 @@ namespace creaImageIO if (mUserSettingsDirectory.size()==0) { mUserSettingsDirectory = GetHomeDirectory(); - mUserSettingsDirectory += "/.gimmick/"; + mUserSettingsDirectory += "/.creaImageIO/"; boost::algorithm::replace_all( mUserSettingsDirectory, INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR); @@ -202,7 +202,7 @@ namespace creaImageIO if (mLocalDatabasePath.size()==0) { mLocalDatabasePath = GetUserSettingsDirectory(); - mLocalDatabasePath += "share/gimmick/"; + mLocalDatabasePath += "share/creaImageIO/"; mLocalDatabasePath += mLocalDBName; mLocalDatabasePath +=".sqlite3"; boost::algorithm::replace_all( mLocalDatabasePath, @@ -259,7 +259,7 @@ namespace creaImageIO VALID_FILE_SEPARATOR); setDir+="share/"; boost::filesystem::create_directory( setDir ); - setDir+="gimmick/"; + setDir+="creaImageIO/"; boost::filesystem::create_directory( setDir ); setDir+=mLocalDescpName; @@ -277,14 +277,14 @@ namespace creaImageIO // The following stuff works on Linux, NOT CHECKED on Windows // JPR #if defined(_WIN32) - path+="/bin/share/gimmick/"; + path+="/bin/share/creaImageIO/"; #endif #if defined (LINUX) - path+="/../share/gimmick/"; + path+="/../share/creaImageIO/"; #endif #if defined(__APPLE__) - path+="/../../../../share/gimmick/"; + path+="/../../../../share/creaImageIO/"; #endif diff --git a/src/creaImageIOSettings.cpp b/src/creaImageIOSettings.cpp index 080a164..fd7cdd5 100644 --- a/src/creaImageIOSettings.cpp +++ b/src/creaImageIOSettings.cpp @@ -16,7 +16,7 @@ namespace creaImageIO Settings::Settings(const std::string i_path) { //need to position path in user directory first. - m_SettingsFileName = i_path + "\\.gimmick\\share\\gimmick\\app.config"; + m_SettingsFileName = i_path + "\\.creaImageIO\\share\\creaImageIO\\app.config"; //Test if Settings File exist if(!boost::filesystem::exists(m_SettingsFileName) ) { diff --git a/src/creaImageIOWxTreeView.cpp b/src/creaImageIOWxTreeView.cpp index db67f8b..85cf000 100644 --- a/src/creaImageIOWxTreeView.cpp +++ b/src/creaImageIOWxTreeView.cpp @@ -847,11 +847,11 @@ namespace creaImageIO if(sel.size()>1&&levelName.at(levelName.size()-1)!='s') { out<<" "<GetTree().GetLevelDescriptor(mLastLevel).GetName()<<" to .gimmick?"; + out<<" "<GetTree().GetLevelDescriptor(mLastLevel).GetName()<<" to .creaImageIO?"; } if (wxMessageBox(crea::std2wx(out.str()), _T("Remove Files"), -- 2.47.1