Skip to content

Use CMAKE_INSTALL_PREFIX as ASSIMP_ROOT_DIR.#1915

Merged
kimkulling merged 2 commits intoassimp:masterfrom
nuclearsandwich:use-install-prefix-as-root-dir
Apr 25, 2018
Merged

Use CMAKE_INSTALL_PREFIX as ASSIMP_ROOT_DIR.#1915
kimkulling merged 2 commits intoassimp:masterfrom
nuclearsandwich:use-install-prefix-as-root-dir

Conversation

@nuclearsandwich
Copy link
Copy Markdown
Contributor

Since the ASSIMP_LIB_INSTALL_DIR where this CMake config file is installed to may contain multiple nested directories, we should not use it to back-calculate the location of the ASSIMP_ROOT_DIR unless we can take the directory depth into account. Instead use the
CMAKE_INSTALL_PREFIX as the ASSIMP_ROOT_DIR at configure-time.

This approach is more flexible with respect to install directories but it means that assimp files are not relocatable after installation and I don't think it works if a DESTDIR option is provided when running make install after cmake configuration.

Proposed to resolve #1914.

Since the ASSIMP_LIB_INSTALL_DIR where this CMake config file is
installed to may contain multiple nested directories, we should not use
it to back-calculate the location of the ASSIMP_ROOT_DIR unless we can
take the directory depth into account. Instead use the
CMAKE_INSTALL_PREFIX as the ASSIMP_ROOT_DIR at configure-time.

This approach is more flexible with respect to install directories but
it means that assimp files are not relocatable after installation and I
don't think it works if a DESTDIR option is provided when running `make
install` after cmake configuration.
@kimkulling
Copy link
Copy Markdown
Member

Looks good, I will merge it!

@kimkulling kimkulling merged commit f7be098 into assimp:master Apr 25, 2018
@kimkulling
Copy link
Copy Markdown
Member

Merged, thanks for the contribution.

@nuclearsandwich nuclearsandwich deleted the use-install-prefix-as-root-dir branch April 25, 2018 20:43
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.

assimp-config.cmake sets incorrect ASSIMP_ROOT_DIR when library path is deeply nested.

2 participants