Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add antares-xpansion DEPS_INSTALL_DIR use case to CMAKE_PREFIX_PATH #156

Merged
merged 3 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[submodule "src/antares-deps"]
path = src/antares-deps
url = https://github.com/AntaresSimulatorTeam/antares-deps.git
branch = v1.0.1
branch = v1.0.2
[submodule "src/tests/resources/Antares_Simulator_Tests"]
path = src/tests/resources/Antares_Simulator_Tests
url = https://github.com/AntaresSimulatorTeam/Antares_Simulator_Tests.git
23 changes: 21 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,31 @@ else()
endif()
endif()

# Build Needed dependencies
add_subdirectory(antares-deps)

# Add DEPS_INSTALL_DIR with antares-xpansion CMAKE_BUILD_TYPE
if (${CMAKE_BUILD_TYPE} STREQUAL "release")

string(REPLACE ${CMAKE_BUILD_TYPE} Release
DEPS_INSTALL_DIR_XPANSION
${DEPS_INSTALL_DIR})

list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR_XPANSION})

elseif(${CMAKE_BUILD_TYPE} STREQUAL "debug")

string(REPLACE ${CMAKE_BUILD_TYPE} Debug
DEPS_INSTALL_DIR_XPANSION
${DEPS_INSTALL_DIR})

list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR_XPANSION})

endif()

list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR})
message(STATUS "CMAKE_PREFIX_PATH : ${CMAKE_PREFIX_PATH}")

# Build Needed dependencies
add_subdirectory(antares-deps)

# Define needed external library

Expand Down
2 changes: 1 addition & 1 deletion src/antares-deps