--- CMakeLists.txt.orig 2020-12-15 13:54:30 UTC +++ CMakeLists.txt @@ -51,7 +51,7 @@ message(STATUS "gau2grid install: ${CMAKE_INSTALL_PREF # << Python >> set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5) # adjust with CMake minimum FindPythonInterp -find_package(PythonLibsNew 3.6 REQUIRED) +find_package(PythonLibsNew ${FREEBSD_PYTHON_VER} REQUIRED) message(STATUS "${Cyan}Found Python ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${ColourReset}: ${PYTHON_EXECUTABLE} (found version ${PYTHON_VERSION_STRING})") @@ -110,6 +110,7 @@ target_include_directories(gg INTERFACE $) # GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share". +if (FALSE) # see https://github.com/dgasmith/gau2grid/issues/39#issuecomment-457856365 set(CMAKECONFIG_INSTALL_DIR "share/cmake/${PN}") configure_package_config_file(cmake/${PN}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PN}Config.cmake" @@ -139,6 +140,7 @@ if(${NATIVE_PYTHON_INSTALL_WITH_LIB} OR (NOT(${INSTALL NAMESPACE "${PN}::" FILE "${PROJECT_BINARY_DIR}/${PN}Targets.cmake") endif() +endif() if(${INSTALL_PYMOD}) if(${NATIVE_PYTHON_INSTALL}) @@ -162,12 +164,12 @@ if(${INSTALL_PYMOD}) OUTPUT_STRIP_TRAILING_WHITESPACE) install(DIRECTORY gau2grid - DESTINATION ${CMAKE_INSTALL_LIBDIR}${PYMOD_INSTALL_LIBDIR} + DESTINATION ${PYMOD_INSTALL_LIBDIR} USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN "*.py") install(FILES $ - DESTINATION ${CMAKE_INSTALL_LIBDIR}${PYMOD_INSTALL_LIBDIR}/gau2grid + DESTINATION ${PYMOD_INSTALL_LIBDIR}/gau2grid RENAME "gg${PYLIB_EXTENSION}") install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE