]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Env tweaks for Eclipse IDE: uninstall & salome environment
authorsbh <sergey.belash@opencascade.com>
Thu, 25 Dec 2014 09:08:08 +0000 (12:08 +0300)
committersbh <sergey.belash@opencascade.com>
Thu, 25 Dec 2014 10:16:34 +0000 (13:16 +0300)
CMakeCommon/cmake_uninstall.cmake.in [new file with mode: 0644]
CMakeLists.txt
build_Salome_eclipse.bat [new file with mode: 0644]

diff --git a/CMakeCommon/cmake_uninstall.cmake.in b/CMakeCommon/cmake_uninstall.cmake.in
new file mode 100644 (file)
index 0000000..2c34c81
--- /dev/null
@@ -0,0 +1,21 @@
+if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+  message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+foreach(file ${files})
+  message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
+  if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+    exec_program(
+      "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+      OUTPUT_VARIABLE rm_out
+      RETURN_VALUE rm_retval
+      )
+    if(NOT "${rm_retval}" STREQUAL 0)
+      message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
+    endif(NOT "${rm_retval}" STREQUAL 0)
+  else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+    message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
+  endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+endforeach(file)
\ No newline at end of file
index ede88ffa09ce6e2d7aed432ad68b6900ffb11a9b..468e790f4832237b40df49db1b959a42eda4a966 100644 (file)
@@ -68,3 +68,12 @@ IF(${HAVE_SALOME})
 ENDIF(${HAVE_SALOME})
 
 ENABLE_TESTING()
+
+# Add the uninstall target for eclipse IDE
+if (CMAKE_GENERATOR MATCHES "NMake Makefiles")
+configure_file("${CMAKE_SOURCE_DIR}/CMakeCommon/cmake_uninstall.cmake.in"
+               "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+               IMMEDIATE @ONLY)
+add_custom_target(uninstall
+                  COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+endif (CMAKE_GENERATOR MATCHES "NMake Makefiles")
diff --git a/build_Salome_eclipse.bat b/build_Salome_eclipse.bat
new file mode 100644 (file)
index 0000000..10a068c
--- /dev/null
@@ -0,0 +1,30 @@
+@ECHO OFF
+
+REM Find absolute path to ROOT_DIR
+@SET PARENT_DIR=%~dp0..
+@SET ROOT_DIR=
+pushd %PARENT_DIR%
+@SET ROOT_DIR=%CD%
+popd
+
+@SET SRC_DIR=%ROOT_DIR%\sources
+@SET OCC_LIB_PREFIX=d
+@SET NewGEOM_ROOT_DIR=%ROOT_DIR%\install
+@SET SalomeAppConfig=%ROOT_DIR%\install\share\salome\resources\newgeom;%GUI_ROOT_DIR%\share\salome\resources\gui
+
+call %SRC_DIR%\env_Salome.bat d
+mkdir %ROOT_DIR%\build-eclipse
+cd %ROOT_DIR%\build-eclipse
+
+@SET CMAKE_ARGS=-G ^"Eclipse CDT4 - NMake Makefiles^"
+@SET CMAKE_ARGS=%CMAKE_ARGS% -D_ECLIPSE_VERSION=4.3
+@SET CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_BUILD_TYPE=Debug
+@SET CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=ON
+@SET CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\install
+@SET CMAKE_ARGS=%CMAKE_ARGS% -DPYTHON_EXECUTABLE=%PYTHONHOME%\python_d.exe
+@SET CMAKE_ARGS=%CMAKE_ARGS% %SRC_DIR%
+
+cmake %CMAKE_ARGS%
+
+@REM Should be defined at ..\local_env.bat
+start %ECLIPSE_EXE%