Commits

Lisandro Dalcin committed b56687a

CMake: add experimental install support

Comments (0)

Files changed (1)

 #  set_target_properties (petiga-static PROPERTIES OUTPUT_NAME "petiga")
 #  set_target_properties (petiga-static PROPERTIES PREFIX "lib")
 #endif()
+
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  set (CMAKE_INSTALL_PREFIX "$ENV{HOME}/petiga" CACHE PATH "PetIGA install prefix" FORCE)
+endif ()
+install (TARGETS   petiga LIBRARY         DESTINATION lib)
+install (DIRECTORY conf/                  DESTINATION conf    FILES_MATCHING PATTERN "petiga*")
+install (DIRECTORY include/               DESTINATION include FILES_MATCHING PATTERN "*.h"    )
+install (DIRECTORY ${PETSC_ARCH}/include/ DESTINATION include FILES_MATCHING PATTERN "*.h"    )
+install (DIRECTORY ${PETSC_ARCH}/include/ DESTINATION include FILES_MATCHING PATTERN "*.mod"  )
+install (CODE "execute_process(COMMAND sed -i s/.{PETSC_ARCH}.//g ${CMAKE_INSTALL_PREFIX}/conf/petigavariables)")