wdas/ptex

cmake files is installed in agnostic architecture cmake path in linux

sl1pkn07 opened this issue · 1 comments

set(CMAKE_DIR "share/cmake/Ptex")

share/cmake is a agnostic architecture path

if build ptex in 32bit mode (if have already installed the library in 64 bits mode), lead to overwrite the current .cmake files, wich now point to /usr/lib{32bits build} instead the 64bits path. lead to mix architectures when to build any program wich depends in ptex

the content of the archive is

└───╼  cat /usr/share/cmake/Ptex/ptex-exports-release.cmake
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Release".
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Import target "Ptex::Ptex_static" for configuration "Release"
set_property(TARGET Ptex::Ptex_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(Ptex::Ptex_static PROPERTIES
  IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libPtex.a"
  )

list(APPEND _IMPORT_CHECK_TARGETS Ptex::Ptex_static )
list(APPEND _IMPORT_CHECK_FILES_FOR_Ptex::Ptex_static "${_IMPORT_PREFIX}/lib/libPtex.a" )

# Import target "Ptex::Ptex_dynamic" for configuration "Release"
set_property(TARGET Ptex::Ptex_dynamic APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(Ptex::Ptex_dynamic PROPERTIES
  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libPtex.so.2.4"
  IMPORTED_SONAME_RELEASE "libPtex.so.2.4"
  )

list(APPEND _IMPORT_CHECK_TARGETS Ptex::Ptex_dynamic )
list(APPEND _IMPORT_CHECK_FILES_FOR_Ptex::Ptex_dynamic "${_IMPORT_PREFIX}/lib/libPtex.so.2.4" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

lib is the path where store the 64bit libs in my distro

for avoid overrwite the .cmake files and lead to cmake search the library in the correct architecture path, the cmake files should be installed in ${CMAKE_INSTALL_LIBDIR}\cmake\Ptex

greetings

Thanks for the heads-up.