[MacPorts] #64757: How to enable Cmake to find Boost?

MacPorts noreply at macports.org
Wed Mar 2 19:38:21 UTC 2022


#64757: How to enable Cmake to find Boost?
--------------------------+--------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  request       |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.7.1
 Keywords:  powerpc       |       Port:  cmake
--------------------------+--------------------
 I am trying to make a new port and it requires Boost. Outside of Macports
 I just use this, and it works:
 `-DBoost_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include`.

 However doing the same in a local port file fails:

 {{{
 CMake Error at
 /opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230
 (message):
   Could NOT find Boost (missing: system filesystem program_options
 date_time)
   (found version "1.76.0")
 Call Stack (most recent call first):
 /opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594
 (_FPHSA_FAILURE_MESSAGE)
   /opt/local/share/cmake-3.22/Modules/FindBoost.cmake:2375
 (find_package_handle_standard_args)
   CMakeLists.txt:207 (find_package)
 }}}

 I started with:


 {{{
 configure.args-append
 -DBOOST_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include
 }}}


 That failed to change anything, and ended with the following, which had
 zero effect again (flags are passed, but to no effect):


 {{{
 configure.env-append    BOOST_ROOT=/opt/local/libexec/boost/1.76 \
 BOOST_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include

 configure.args-append   -DBOOST_ROOT=/opt/local/libexec/boost/1.76 \
 -DBOOST_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include \
 -DBOOST_LIB_DIR=/opt/local/libexec/boost/1.76/include


 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/64757>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list