1. openssl配置

  1. cd /usr/local/lib/pkgconfig
  2. ln -s ../../Cellar/openssl@1.1/1.1.1i/lib/pkgconfig/libcrypto.pc libcrypto.pc
  3. ln -s ../../Cellar/openssl@1.1/1.1.1i/lib/pkgconfig/libssl.pc libssl.pc
  4. ln -s ../../Cellar/openssl@1.1/1.1.1i/lib/pkgconfig/openssl.pc openssl.pc

2. boost配置

https://github.com/nmante/pkg-config-generator

  1. python main.py -n boost -v 1.75.0 -p /usr/local/Cellar/boost/1.75.0_1 -o boost.pc /usr/local/Cellar/boost/1.75.0_1/lib
  1. pkg-config-generator git:(master) cat boost.pc
  2. # Package Information for pkg-config
  3. prefix=/usr/local/Cellar/boost/1.75.0_1
  4. exec_prefix=${prefix}
  5. libdir=${exec_prefix}/lib
  6. includedir_old=${prefix}/include/boost
  7. includedir_new=${prefix}/include
  8. Name: boost
  9. Description:
  10. Version: 1.75.0
  11. Libs: -L${exec_prefix}/lib -lboost_prg_exec_monitor-mt -lboost_unit_test_framework-mt -lboost_math_c99f-mt -lboost_math_c99f -lboost_stacktrace_basic-mt -lboost_math_tr1l -lboost_stacktrace_noop-mt -lboost_log-mt -lboost_regex-mt -lboost_type_erasure -lboost_stacktrace_basic -lboost_filesystem -lboost_thread-mt -lboost_math_tr1f-mt -lboost_serialization-mt -lboost_graph -lboost_timer -lboost_nowide -lboost_stacktrace_addr2line -lboost_contract -lboost_test_exec_monitor-mt -lboost_container -lboost_math_tr1 -lboost_type_erasure-mt -lboost_nowide-mt -lboost_program_options-mt -lboost_fiber-mt -lboost_wave -lboost_contract-mt -lboost_date_time -lboost_stacktrace_noop -lboost_filesystem-mt -lboost_random -lboost_system -lboost_locale-mt -lboost_json -lboost_wserialization -lboost_regex -lboost_exception -lboost_timer-mt -lboost_date_time-mt -lboost_log_setup-mt -lboost_math_c99-mt -lboost_math_tr1-mt -lboost_graph-mt -lboost_serialization -lboost_prg_exec_monitor -lboost_exception-mt -lboost_coroutine -lboost_log_setup -lboost_math_c99 -lboost_iostreams-mt -lboost_system-mt -lboost_program_options -lboost_container-mt -lboost_atomic-mt -lboost_random-mt -lboost_math_c99l -lboost_stacktrace_addr2line-mt -lboost_math_tr1l-mt -lboost_context-mt -lboost_wserialization-mt -lboost_coroutine-mt -lboost_log -lboost_chrono-mt -lboost_wave-mt -lboost_unit_test_framework -lboost_test_exec_monitor -lboost_math_tr1f -lboost_iostreams -lboost_chrono -lboost_json-mt -lboost_math_c99l-mt
  12. Cflags: -I${includedir_old} -I${includedir_new}
  1. pkg-config boost --libs
  2. -L/usr/local/Cellar/boost/1.75.0_1/lib -lboost_prg_exec_monitor-mt -lboost_unit_test_framework-mt -lboost_math_c99f-mt -lboost_math_c99f -lboost_stacktrace_basic-mt -lboost_math_tr1l -lboost_stacktrace_noop-mt -lboost_log-mt -lboost_regex-mt -lboost_type_erasure -lboost_stacktrace_basic -lboost_filesystem -lboost_thread-mt -lboost_math_tr1f-mt -lboost_serialization-mt -lboost_graph -lboost_timer -lboost_nowide -lboost_stacktrace_addr2line -lboost_contract -lboost_test_exec_monitor-mt -lboost_container -lboost_math_tr1 -lboost_type_erasure-mt -lboost_nowide-mt -lboost_program_options-mt -lboost_fiber-mt -lboost_wave -lboost_contract-mt -lboost_date_time -lboost_stacktrace_noop -lboost_filesystem-mt -lboost_random -lboost_system -lboost_locale-mt -lboost_json -lboost_wserialization -lboost_regex -lboost_exception -lboost_timer-mt -lboost_date_time-mt -lboost_log_setup-mt -lboost_math_c99-mt -lboost_math_tr1-mt -lboost_graph-mt -lboost_serialization -lboost_prg_exec_monitor -lboost_exception-mt -lboost_coroutine -lboost_log_setup -lboost_math_c99 -lboost_iostreams-mt -lboost_system-mt -lboost_program_options -lboost_container-mt -lboost_atomic-mt -lboost_random-mt -lboost_math_c99l -lboost_stacktrace_addr2line-mt -lboost_math_tr1l-mt -lboost_context-mt -lboost_wserialization-mt -lboost_coroutine-mt -lboost_log -lboost_chrono-mt -lboost_wave-mt -lboost_unit_test_framework -lboost_test_exec_monitor -lboost_math_tr1f -lboost_iostreams -lboost_chrono -lboost_json-mt -lboost_math_c99l-mt
  3. build git:(master)
  1. pkg-config boost --cflags
  2. -I/usr/local/Cellar/boost/1.75.0_1/include/boost -I/usr/local/Cellar/boost/1.75.0_1/include
  1. build git:(master) pkg-config boost --help
  2. Usage:
  3. pkg-config [OPTION...]
  4. Help Options:
  5. -h, --help Show help options
  6. Application Options:
  7. --version output version of pkg-config
  8. --modversion output version for package
  9. --atleast-pkgconfig-version=VERSION require given version of pkg-config
  10. --libs output all linker flags
  11. --static output linker flags for static linking
  12. --short-errors print short errors
  13. --libs-only-l output -l flags
  14. --libs-only-other output other libs (e.g. -pthread)
  15. --libs-only-L output -L flags
  16. --cflags output all pre-processor and compiler flags
  17. --cflags-only-I output -I flags
  18. --cflags-only-other output cflags not covered by the cflags-only-I option
  19. --variable=NAME get the value of variable named NAME
  20. --define-variable=NAME=VALUE set variable NAME to VALUE
  21. --exists return 0 if the module(s) exist
  22. --print-variables output list of variables defined by the module
  23. --uninstalled return 0 if the uninstalled version of one or more module(s) or their dependencies will be used
  24. --atleast-version=VERSION return 0 if the module is at least version VERSION
  25. --exact-version=VERSION return 0 if the module is at exactly version VERSION
  26. --max-version=VERSION return 0 if the module is at no newer than version VERSION
  27. --list-all list all known packages
  28. --debug show verbose debug information
  29. --print-errors show verbose information about missing or conflicting packages (default unless --exists or --atleast/exact/max-version given on the command line)
  30. --silence-errors be silent about errors (default when --exists or --atleast/exact/max-version given on the command line)
  31. --errors-to-stdout print errors from --print-errors to stdout not stderr
  32. --print-provides print which packages the package provides
  33. --print-requires print which packages the package requires
  34. --print-requires-private print which packages the package requires for static linking
  35. --validate validate a package's .pc file
  36. --define-prefix try to override the value of prefix for each .pc file found with a guesstimated value based on the location of the .pc file
  37. --dont-define-prefix don't try to override the value of prefix for each .pc file found with a guesstimated value based on the location of the .pc file
  38. --prefix-variable=PREFIX set the name of the variable that pkg-config automatically sets