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

new cmake harness #205

Open
wants to merge 123 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
a764784
this builds a library entirely with cmake
loriab Sep 27, 2019
8460bdf
build static and shared. process version and soversion.
loriab Sep 28, 2019
ed896f0
builds and works with psi4 libint2 branch
loriab Oct 2, 2019
516d6ba
more cmake tidying
loriab Oct 3, 2019
9d33d32
cmake info passing fixes
loriab Oct 3, 2019
82a1a7e
fixes
loriab Oct 3, 2019
3a302ac
cmake_module_path fix
loriab Oct 3, 2019
0ba973b
am_eri defaulting, take 4
loriab Oct 5, 2019
5af026c
opt_am fix
loriab Oct 5, 2019
02b6e43
try some gmp variations for windows
loriab Nov 26, 2019
ab73c8d
adapt for windows
loriab Nov 26, 2019
677de15
adapt for windows: srandom --> srand
loriab Nov 26, 2019
ef2b5af
adapt for windows: random --> rand
loriab Nov 27, 2019
d9a25d2
adapt for windows
loriab Nov 27, 2019
bb55f22
adapt for windows
loriab Nov 27, 2019
db785a8
adapt for windows
loriab Nov 27, 2019
c4b93fc
adapt for windows
loriab Nov 27, 2019
f2c586f
adapt for windows
loriab Nov 27, 2019
d128e48
adapt for windows
loriab Nov 27, 2019
67c853f
adapt for windows
loriab Nov 27, 2019
71fd890
adapt for windows
loriab Nov 27, 2019
41e6cfb
adapt for windows
loriab Nov 28, 2019
d6525b4
adapt for windows
loriab Nov 29, 2019
40e8477
adapt for windows
loriab Nov 29, 2019
9fb43c8
adapt for windows
loriab Nov 29, 2019
bb9b7ae
switch to generate, export, library 3-step CMake flow
loriab Dec 4, 2019
4383c6c
am component improvements
loriab Dec 7, 2019
d91fcce
debug
loriab Dec 8, 2019
cb58fdf
debug
loriab Dec 8, 2019
1dc54c9
debug
loriab Dec 8, 2019
4129968
config printing
loriab Dec 8, 2019
972a826
config printing
loriab Dec 8, 2019
ae27f7a
fpic handling
loriab Dec 8, 2019
d152bdc
fpic again
loriab Dec 8, 2019
e5f5dca
add generic code option
loriab Dec 9, 2019
6cf403b
add testing to library
loriab Dec 10, 2019
9c12cfd
more windows mods
loriab Dec 12, 2019
ee9365d
more output please
loriab Dec 12, 2019
0ab0367
more windows mods
loriab Dec 12, 2019
0c7cecd
more windows mods
loriab Dec 13, 2019
098a76e
more windows mods
loriab Dec 13, 2019
7fd4e7f
more windows mods
loriab Dec 13, 2019
958e955
win pokgin
loriab Dec 17, 2019
cbf4c5f
no more stars in basis names
loriab Dec 17, 2019
fae8caa
increase stack on win
loriab Jan 18, 2020
d5b6ee2
win stack in the right place
loriab Jan 19, 2020
ddb4361
strdup win
loriab Jan 21, 2020
ebe3fad
add libint_pragma changes, fixes #160
loriab Sep 10, 2020
5b54f6a
fix more (n2) in test. bundle boost with export. max_am[_eri3] advice…
loriab Sep 22, 2020
8ae554c
Adds eri3 and eri2 components, so if need library to compile 3-cente…
loriab Sep 28, 2020
3860201
missed a ref for export
loriab Sep 29, 2020
da780fd
Fix freeing of aligned memory on Windows
andysim Oct 21, 2020
4c5ab73
Merge pull request #1 from andysim/l2cmake
loriab Oct 22, 2020
d2843ee
boost detection for export, notes
loriab Oct 22, 2020
ed09cd1
minor notes
loriab Oct 23, 2020
f2581c7
psi4OptionsTools -> options, + fixed booleanize01 when dealing with C…
evaleev Jan 26, 2021
0a05675
removed almost all ExternalProject instances
evaleev Jan 26, 2021
e93d4ae
rewrote library exporting stages
evaleev Jan 27, 2021
e44ad20
generated library builds and passes tests
evaleev Jan 27, 2021
c2592cb
upgraded catch2 to 2.13.4, resolves #202
evaleev Jan 27, 2021
a1856db
Merge branch 'master' into features/new-cmake-harness
evaleev Jan 31, 2021
7d193eb
typo
evaleev Jun 25, 2021
689ab61
reduced contention in nuclear ints engine due to unnecessary shared_p…
evaleev Jun 25, 2021
8533dd9
minor cleanup to avoid copies of operator params
evaleev Jun 25, 2021
308d658
Merge branch 'master' into features/new-cmake-harness
evaleev Jul 4, 2021
3b7f0f8
typos
evaleev Jul 4, 2021
e637b47
fixup option_with_default
evaleev Jul 4, 2021
505e6b2
enable C language before building library
evaleev Jul 4, 2021
9059b16
[ci] switch to cmake harness for everything
evaleev Jul 4, 2021
4e37cac
[ci] disable fortran for now
evaleev Jul 5, 2021
00e79bb
[ci] need to install libmpfr-dev on ubuntu runners
evaleev Jul 5, 2021
5122653
MakeVars.features -> features
evaleev Jul 5, 2021
02a1c80
hartree-fock++-validate.py exits if features file not found
evaleev Jul 5, 2021
dc61487
exported library looks for PythonInterp to be able to properly valida…
evaleev Jul 5, 2021
3d06d5f
[ci] install built library before testing it from install tree
evaleev Jul 5, 2021
09539e6
relocated all cmake "modules" to cmake/modules
evaleev Jul 5, 2021
ac79816
generate source during compiler build
evaleev Jul 5, 2021
2cdac7d
make tests subprojectable
evaleev Jul 5, 2021
615a215
[ci] build library using both ExternalProject and FetchContent
evaleev Jul 5, 2021
a0db3c4
fixup
evaleev Jul 5, 2021
9b1054c
plug memory leaks in mpf numeric functions
evaleev Jul 6, 2021
576b951
[ci] try fixing install issues by creating install dir
evaleev Jul 6, 2021
f6205a4
building library as subproject does not require running cmake second …
evaleev Jul 6, 2021
afb74cd
Merge remote-tracking branch 'origin/features/new-cmake-harness' into…
evaleev Jul 6, 2021
e2cb6eb
clarify that only GMPXX is actually needed, not MPFR + improve depend…
evaleev Jul 6, 2021
032afe4
executables not built by default
evaleev Jul 6, 2021
f842c0a
cleanup
evaleev Jul 6, 2021
8f5ff9d
wip ... unnecessary deps on mpfr/gmp removed + install of libint-Eige…
evaleev Jul 6, 2021
986b4ab
libint targets depend on Boost::boost, if present
evaleev Jul 7, 2021
83cb622
fix install of externalproject and fetchcontent-based builds
evaleev Jul 7, 2021
b3884b0
comment
evaleev Jul 7, 2021
5bf226b
cleanup
evaleev Jul 7, 2021
c9e8057
fixed install target for ExternalProject-based build
evaleev Jul 7, 2021
2855b5a
int-{shared,static} are "bare" libraries (no Eigen or Boost), int-cxx…
evaleev Jul 7, 2021
c446dba
revived fortran
evaleev Jul 7, 2021
fc52be1
[ci] enable Fortran
evaleev Jul 7, 2021
f46d8b9
pass Fortran and other flags to ExternalProjct_add more carefully
evaleev Jul 7, 2021
d2723fb
removed much of autotools harness
evaleev Jul 7, 2021
e3d7aad
libint-libcompiler only needs GMPXX
evaleev Jul 7, 2021
47517b2
moved tests to src/lib/libint/tests
evaleev Jul 7, 2021
fbb51ef
moved compiler tests from src/bin/* to tests + reorg ... not finished
evaleev Jul 8, 2021
f7b6b17
starting to revive compiler tests
evaleev Jul 8, 2021
4a1949f
library ExternalProject-based build fixups
evaleev Jul 8, 2021
963bc5f
moved INSTALL and LICENSE from export to src/lib/libint
evaleev Jul 8, 2021
5b2b881
removed more legacy build files
evaleev Jul 8, 2021
51318f0
more work towards running libint-compiler-eri-test
evaleev Sep 10, 2021
76b6605
generalizing component names
evaleev Sep 10, 2021
3894ab2
INSTALL -> INSTALL.md
evaleev Sep 10, 2021
6c26803
Merge branch 'master' into features/new-cmake-harness
evaleev Jan 13, 2022
3e1d02d
C++ API only available when both 1-body and some 2-body (ERI, ERI3, E…
evaleev Oct 7, 2021
e0b7a7d
amended 59db8d447ceb2cecba25c4326797c74d0762f323
evaleev Oct 7, 2021
90a77e6
amend 09539e62577ae7a5555049f95f37858f43f0ec54
evaleev Oct 7, 2021
80dbcc0
use "modern" if(COND) ... else() ... endif() convention
evaleev Jan 13, 2022
2b6294e
added missing BOOST_PP_STRINGIZE in boost pp stuff in build_libint
evaleev Jan 14, 2022
69cd873
always UNITY_BUILD the generated library, never the compiler ... bump…
evaleev Jan 14, 2022
83d791a
fixup and propagate changes of c5cc9aa9b1170aef8b44dcaabbf6070b9d97df…
evaleev Jan 14, 2022
03b0f35
partially reverting 76b6605c9b99252176eb51071ffd6e38f8b4f1c0 since th…
evaleev Jan 14, 2022
e886334
fixup an #include
evaleev Jan 14, 2022
d3694ca
updated int_am to use "new" component names
evaleev Jan 14, 2022
b13667b
update the comparison threshold for fortran/test-eri
evaleev Jan 14, 2022
6c10230
Delete .project
evaleev Jan 16, 2022
10e00e8
added .gitignore
evaleev Jan 16, 2022
eacb677
added default int-cxx-{shared,static} is compiled, not interface: it …
evaleev Jan 18, 2022
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
Prev Previous commit
Next Next commit
builds and works with psi4 libint2 branch
  • Loading branch information
loriab committed Sep 10, 2020
commit ed896f0e13b3a432d01a65fbe1807bf03f66ee43
153 changes: 94 additions & 59 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ project(Libint2
set(Libint2_AUTHORS "Edward F. Valeev")
set(Libint2_DESCRIPTION "High-performance library for computing Gaussian integrals in quantum mechanics")
set(Libint2_URL "https://github.com/evaleev/libint")
#set(Libint2_LICENSE "GPL-3.0 for generator; LGPL-3.0 for generated")
set(Libint2_LICENSE "GPL-3.0 for generator; LGPL-3.0 for generated")

cmake_policy(SET CMP0074 NEW)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake
${PROJECT_SOURCE_DIR}/export/cmake/modules)


################################### Options ####################################
include(int_versions)
include(user_has_defined)
Expand All @@ -25,14 +24,18 @@ option_with_print(BUILD_STATIC "Build at least static library" ON)

# <<< Which Integrals Classes, Which Derivative Levels >>>

option_with_default(ENABLE_1BODY
option_with_default(ENABLE_ONEBODY
"Compile with support for up to N-th derivatives of 1-body integrals (-1 for OFF)" 0)
option_with_default(ENABLE_ERI
"Compile with support for up to N-th derivatives of electron repulsion integrals (-1 for OFF)" 0)
option_with_default(ENABLE_ERI3
"Compile with support for up to N-th derivatives of 3-center electron repulsion integrals (-1 for OFF)" -1)
option_with_default(ENABLE_ERI2
"Compile with support for up to N-th derivatives of 2-center electron repulsion integrals (-1 for OFF)" -1)
option_with_default(ENABLE_G12
"Compile with support for N-th derivatives of MP2-F12 energies with Gaussian factors (-1 for OFF)" -1)
option_with_default(ENABLE_G12DKH
"Compile with support for N-th derivatives of DKH-MP2-F12 energies with Gaussian factors (-1 for OFF)" -1)

# <<< Ordering Conventions >>>

Expand Down Expand Up @@ -63,6 +66,10 @@ option_with_default(LIBINT2_SHELL_SET
l(a) < l(c) || (l(a) == l(c) && l(b) < l(d))
for (b|cd):
l(c) <= l(d)" standard)
option_with_print(ERI3_PURE_SH
"Assume the 'unpaired' center of 3-center ERIs will be transformed to pure solid harmonics" OFF)
option_with_print(ERI2_PURE_SH
"Assume the 2-center ERIs will be transformed to pure solid harmonics" OFF)

# <<< How High Angular Momentum >>>

Expand All @@ -71,12 +78,26 @@ option_with_default(LIBINT_MAX_AM
Can specify values for each derivative levels as a semicolon-separated string N0,N1,N2..." 4)
option_with_default(LIBINT_OPT_AM
"Optimize maximally for up to angular momentum N (N <= max-am). (default: (max_am/2)+1)" 3)
option_with_default(MULTIPOLE_MAX_ORDER
"Maximum order of spherical multipole integrals. There is no maximum" 4)
option_with_default(ONEBODY_MAX_AM
"Support 1-e ints for Gaussians of angular momentum up to N.
Can specify values for each derivative as a semicolon-separated string N0,N1,N2..." 4)
option_with_default(ONEBODY_OPT_AM
"Optimize 1-e ints maximally for up to angular momentum N (N <= max-am).
Can specify values for each derivative levels as a semicolor-separated string N0,N1,N2..." 3)
option_with_default(ERI_MAX_AM
"Support ERIs for Gaussians of angular momentum up to N.
Can specify values for each derivative levels as a semicolon-separated string N0;N1;N2..." 4)
option_with_default(ERI_OPT_AM
"Optimize ERIs maximally for up to angular momentum N (N <= max-am).
Can specify values for each derivative levels as a semicolon-separated string N0,N1,N2... (default: (eri_max_am/2)+1)" -1)
Can specify values for each derivative levels as a semicolon-separated string N0,N1,N2... (default: (max_am/2)+1)" 3)
option_with_default(ERI3_MAX_AM
"Support 3-center ERIs for Gaussians of angular momentum up to N.
Can specify values for each derivative levels as a semicolon-separated string N0,N1,N2..." 4)
option_with_default(ERI3_OPT_AM
"Optimize 3-center ERIs maximally for up to angular momentum N (N <= max-am).
Can specify values for each derivative levels as a semicolon-separated string N0,N1,N2... (default: (max_am/2)+1)" 3)

# <<< Miscellaneous >>>

Expand All @@ -86,8 +107,7 @@ option_with_default(LIBINT_ERI_STRATEGY
option_with_print(LIBINT_USE_COMPOSITE_EVALUATORS
"Libint will use composite evaluators (i.e. every evaluator will compute one integral type only)" ON)
option_with_print(LIBINT_SINGLE_EVALTYPE
"Generate single evaluator type (i.e. all tasks use the same evaluator)
LAB: looks effectively hardcoded in configure, RT error if OFF" ON)
"Generate single evaluator type (i.e. all tasks use the same evaluator)" ON)

#option_with_print(BUILD_SHARED_LIBS "Build final library as shared, not static" OFF)
#option_with_default(BUILD_FPIC "Libraries will be compiled with position independent code" ON)
Expand Down Expand Up @@ -115,15 +135,6 @@ option_with_print(ENABLE_FORTRAN "Build Fortran 90 interface" OFF)
#CONFIGURE integrals (all but overlap, kinetic, elecpot). These
#CONFIGURE derivatives are disabled by default to save compile
#CONFIGURE time.
#CONFIGURE --enable-g12=N Compile with support for N-th derivatives of MP2-F12
#CONFIGURE energies with Gaussian factors
#CONFIGURE --enable-g12dkh=N Compile with support for N-th derivatives of
#CONFIGURE DKH-MP2-F12 energies with Gaussian factors
#CONFIGURE --enable-eri3-pure-sh Assume the "unpaired" center of 3-center electron
#CONFIGURE repulsion integrals will be transformed to pure
#CONFIGURE solid harmonics
#CONFIGURE --enable-eri2-pure-sh Assume the 2-center electron repulsion integrals
#CONFIGURE will be transformed to pure solid harmonics
#CONFIGURE --disable-t1g12-support Libint will not support [Ti,G12] integrals
#CONFIGURE --enable-unrolling Unroll shell sets into integrals
#CONFIGURE (--enable-unrolling=S will unroll shell sets larger
Expand Down Expand Up @@ -153,21 +164,6 @@ option_with_print(ENABLE_FORTRAN "Build Fortran 90 interface" OFF)
#CONFIGURE --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
#CONFIGURE --with-api-prefix Prepend this string to every name in the library API
#CONFIGURE (except for the types).
#CONFIGURE --with-1body-max-am=N Support 1-e ints for Gaussians of angular momentum
#CONFIGURE up to N. Can specify values for each derivative
#CONFIGURE levels as a list N0,N1,N2...
#CONFIGURE --with-1body-opt-am=N Optimize 1-e ints maximally for up to angular
#CONFIGURE momentum N (N <= max-am). Can specify values for
#CONFIGURE each derivative levels as a list N0,N1,N2...
#CONFIGURE --with-multipole-max-order=N
#CONFIGURE Maximum order of spherical multipole integrals. The
#CONFIGURE default is 4. There is no maximum
#CONFIGURE --with-eri3-max-am=N Support 3-center ERIs for Gaussians of angular
#CONFIGURE momentum up to N. Can specify values for each
#CONFIGURE derivative levels as a list N0,N1,N2...
#CONFIGURE --with-eri3-opt-am=N Optimize 3-center ERIs maximally for up to angular
#CONFIGURE momentum N (N <= max-am). Can specify values for
#CONFIGURE each derivative levels as a list N0,N1,N2...
#CONFIGURE --with-eri2-max-am=N Support 2-center ERIs for Gaussians of angular
#CONFIGURE momentum up to N. Can specify values for each
#CONFIGURE derivative levels as a list N0,N1,N2...
Expand Down Expand Up @@ -254,26 +250,62 @@ option_with_print(ENABLE_FORTRAN "Build Fortran 90 interface" OFF)

######################## Process & Validate Options ###########################
include(autocmake_safeguards)
include(CheckFunctionExists)
include(int_orderings)
include(int_am)

check_function_exists(posix_memalign HAVE_POSIX_MEMALIGN)
if (HAVE_POSIX_MEMALIGN)
set(LIBINT2_ALIGN_SIZE "0" CACHE STRING "(EXPERT) if posix_memalign is available, this will specify alignment of Libint data, in units of sizeof(LIBINT2_REALTYPE). Default is to use built-in heuristics")
endif()

# again, req'd for now
set(LIBINT_HAS_CXX11 1)

# req'd for now (no FindGMP.cmake, though one at Elemental project)
find_package(MPFR REQUIRED)
get_property(_loc TARGET MPFR::Library PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
message("iid ${_loc}")
get_property(_loc TARGET MPFR::Library PROPERTY INTERFACE_LINK_LIBRARIES)
message("ill ${_loc}")
#get_property(_loc TARGET MPFR::Library PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
#message("iid ${_loc}")
#get_property(_loc TARGET MPFR::Library PROPERTY INTERFACE_LINK_LIBRARIES)
#message("ill ${_loc}")
if (TARGET MPFR::MPFRXX)
set(LIBINT_HAS_MPFR 1)
endif()

find_package(Boost 1.57 REQUIRED)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why Boost 1.57+ is necessary (#180).

Copy link
Owner Author

Choose a reason for hiding this comment

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

if (TARGET Boost::boost) # the header-only target
set(LIBINT_HAS_SYSTEM_BOOST_PREPROCESSOR_VARIADICS 1)
endif()

find_package(Eigen3 REQUIRED)
if (TARGET Eigen3::Eigen)
set(LIBINT_HAS_EIGEN 1)
endif()

unset(_temp_h CACHE)
find_path(_temp_h
NAMES stdint.h)
find_path(_temp_h NAMES stdint.h)
if(_temp_h)
set (HAVE_STDINT_H 1)
endif()

booleanize01(ERI3_PURE_SH)
booleanize01(ERI2_PURE_SH)
booleanize01(LIBINT_SINGLE_EVALTYPE)

set(LIBINT_USE_TYPE_TRAITS 1)
set(LIBINT_USE_MEMORY 1)
set(LIBINT_USE_ARRAY 1)
set(LIBINT_HAS_STD_TYPE_TRAITS 1)
set(LIBINT_HAS_STD_SHARED_PTR 1)
set(LIBINT_HAS_STD_MAKE_SHARED 1)
set(LIBINT_HAS_STD_ARRAY 1)
set(LIBINT_ARRAY_HAS_FILL 1)
set(LIBINT_CONTRACTED_INTS 1)
set(LIBINT_ALIGN_SIZE 0)
set(LIBINT_ENABLE_UNROLLING 100)
set(DISABLE_ONEBODY_PROPERTY_DERIVS 1)
set(LIBINT_HOST_ARCH "x86_64-pc-linux-gnu")
set(LIBINT_TARGET_ARCH "x86_64-pc-linux-gnu")
################################# Main Project #################################
set(STAGED_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/stage)

Expand All @@ -288,30 +320,33 @@ if (ENABLE_FORTRAN)
endif()

configure_file(include/libint2/config.h.cmake.in include/libint2/config.h @ONLY)
set(DATADIR_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/libint/${LIBINT_VERSION})
configure_file(include/libint2/basis.h.in include/libint2/basis.h @ONLY)
##configure_file(cmake/libint.pc.in libint.pc @ONLY)

## <<< Install >>>
#
#install(DIRECTORY ${STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
# ${STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}
# ${STAGED_INSTALL_PREFIX}/share
# DESTINATION ${CMAKE_INSTALL_PREFIX}
# USE_SOURCE_PERMISSIONS
# PATTERN "*header*" EXCLUDE)
#
## <<< Export Config >>>
#
## GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
#set(CMAKECONFIG_INSTALL_DIR "share/cmake/${PN}")
#configure_package_config_file(cmake/${PN}Config.cmake.in
# "${CMAKE_CURRENT_BINARY_DIR}/${PN}Config.cmake"
# INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
#write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
# VERSION ${${PN}_VERSION}
# COMPATIBILITY SameMajorVersion)
#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}Config.cmake
# ${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
# DESTINATION ${CMAKECONFIG_INSTALL_DIR})
#
# <<< Install >>>

install(DIRECTORY ${STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
#${STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}
${STAGED_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}
${STAGED_INSTALL_PREFIX}/share
DESTINATION ${CMAKE_INSTALL_PREFIX}
USE_SOURCE_PERMISSIONS)

# <<< Export Config >>>

# GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
set(CMAKECONFIG_INSTALL_DIR "share/cmake/${PN}")
message("share ${CMAKECONFIG_INSTALL_DIR}")
configure_package_config_file(cmake/${PN}Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/${PN}Config.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
VERSION ${${PN}_VERSION}
COMPATIBILITY SameMajorVersion)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PN}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PN}ConfigVersion.cmake
DESTINATION ${CMAKECONFIG_INSTALL_DIR})

#install(FILES ${PROJECT_BINARY_DIR}/libint.pc
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/)
Loading