Skip to content
Snippets Groups Projects
Verified Commit 46a6681b authored by Paul Dechamps's avatar Paul Dechamps :speech_balloon:
Browse files

(ci, install) Followed dartflo commit and modified install rules

Avoid modifying install path if the project is a submodule. In that case, installation is handled by the top project.
parent c4dfd54b
No related branches found
No related tags found
1 merge request!1BLASTER v1.0
Pipeline #51195 passed
......@@ -78,15 +78,13 @@ INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) # to find "amfe_def.h"
ENABLE_TESTING()
# -- INSTALL
# Check if the project is the main project and the installation path is not specified
IF(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND NOT(CMAKE_INSTALL_PREFIX MATCHES "blaster$"))
SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/blaster" CACHE STRING "Install location" FORCE)
ENDIF()
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
IF(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -m site --user-site OUTPUT_VARIABLE PY_SITE OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "\\\\" "/" PY_SITE ${PY_SITE})
SET(CMAKE_INSTALL_PREFIX "${PY_SITE}/blaster" CACHE STRING "Install location" FORCE)
SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT FALSE)
ENDIF()
ENDIF()
IF(UNIX)
......
Subproject commit 4d01a1dee135a7489b51093546ea41aa64f15352
Subproject commit aa8d1ed8bc1822bc2140aaf8a8d3160b9aa7bf46
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment