Skip to content

Improved installation paths#901

Open
volkm wants to merge 6 commits intostormchecker:masterfrom
volkm:installation
Open

Improved installation paths#901
volkm wants to merge 6 commits intostormchecker:masterfrom
volkm:installation

Conversation

@volkm
Copy link
Copy Markdown
Contributor

@volkm volkm commented Mar 25, 2026

  • Use CMake variables instead of fixed paths, e.g. CMAKE_INSTALL_LIBDIR instead of lib
  • Install libcarl into the same directory as the Storm libs to avoid issues with subdirectories

set(STORM_RESOURCE_LIBRARY_INSTALL_DIR "${_IMPORT_PREFIX}/@STORM_RESOURCE_LIBRARY_INSTALL_DIR@")

include("${CMAKE_CURRENT_LIST_DIR}/carlConfig.cmake")
include("${STORM_RESOURCE_LIBRARY_INSTALL_DIR}/cmake/carl/carlConfig.cmake")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about replacing ${CMAKE_CURRENT_LIST_DIR} by ${STORM_RESOURCE_LIBRARY_INSTALL_DIR}/cmake What is the motivation for that (I understand the carl/ part?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new changes, the carlConfig will be in a directory next to the Storm repository and not a sub-directory anymore. So we would need to go up one directory. But I guess we could still use "${CMAKE_CURRENT_LIST_DIR}/../carl/carlConfig.cmake".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I dislike a bit that carl will be installed on the same level as storm, but if we do it that way, I understand the use of absolute paths.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then I will keeps it as is for now.
I will check whether putting carl a level deeper would also work.

set(STORM_RESOURCE_LIBRARY_INSTALL_DIR lib/storm/resources/ CACHE PATH "Installation directory for dependency library files")
include(GNUInstallDirs)
set(STORM_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/storm CACHE PATH "Installation directory for header files" )
set(STORM_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change the default? For custom-built paths (vs packages) the old default seems to make it easier to cleanup?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CMake variables CMAKE_INSTALL_INCUDEDIR etc. can also be set from cmake or ccmake. So this makes it a bit more configurable in my view instead of using fixed paths as default. I thought using the standard locations provided by GnuInstallDirs would make it better align with the standard behavior of others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants