Forgottenserver: CMake doesn't find pugixml on OS X/macOS

Created on 2 Dec 2016  路  3Comments  路  Source: otland/forgottenserver

Before creating an issue, please ensure:

  • [X] This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/support.16/ for support)
  • [X] This issue is reproducible without changes to the code in this repository

Steps to reproduce (include any configuration/script required to reproduce)

  1. Install all dependencies using Homebrew as described in the wiki (https://github.com/otland/forgottenserver/wiki/Compiling-on-Mac-OS-X)
  2. Run cmake .. from the build dir

Expected behaviour


CMake finds pugixml

Actual behaviour

CMake Error at /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find PugiXML (missing: PUGIXML_INCLUDE_DIR PUGIXML_LIBRARIES)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindPugiXML.cmake:5 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:22 (find_package)

Environment


OS: OS X El Capitan / macOS Sierra
CMake: 3.7.1
pugixml: 1.8.1

bug

All 3 comments

Try: cmake -DPUGIXML_INCLUDE_DIR=/usr/local/opt/pugixml/include/pugixml-1.8 -DPUGIXML_LIBRARIES=/usr/local/opt/pugixml/lib/pugixml-1.8 ..

That works, but it's a workaround. CMake should be able to find the paths without having to specify them, it worked before and I'm not sure how it broke.

@jakon89 It's actually: cmake .. -DPUGIXML_INCLUDE_DIR=/usr/local/opt/pugixml/include/pugixml-1.8 -DPUGIXML_LIBRARIES=/usr/local/opt/pugixml/lib/pugixml-1.8/libpugixml.a

You have to give the full path to the binary, otherwise cmake will ignore your definition. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EPuncker picture EPuncker  路  3Comments

souzajunior picture souzajunior  路  4Comments

Zbizu picture Zbizu  路  5Comments

irenicus30 picture irenicus30  路  5Comments

mishimalisa picture mishimalisa  路  5Comments