piratical / Madeline_2.0_PDE

The Madeline 2.0 Pedigree Drawing Engine (PDE) is a pedigree drawing program designed to handle large and complex pedigrees with an emphasis on readability and aesthetics. The program was designed primarily for human pedigrees.
GNU General Public License v2.0
19 stars 18 forks source link

CMake error during build in Mac OSX #44

Closed lea-urpa closed 3 years ago

lea-urpa commented 6 years ago

Hello! I'm trying to build Madeline 2.0 locally on my Mac, running OSX 10.11.6. I'm having a recurrent error:

-- === NOTA BENE: === Madeline will be installed in /usr/local
CMake Error at /opt/local/share/cmake-3.9/Modules/FindDoxygen.cmake:542 (elseif):
  given arguments:

"NOT" "doxygen" "IN_LIST" "Doxygen_FIND_COMPONENTS"

  Unknown arguments specified
 Call Stack (most recent call first):
  CMakeLists.txt:57 (INCLUDE)

-- Configuring incomplete, errors occurred!

I realize that this is a CMake error, so this might not be the best place to ask, but debugging this kind of build is a bit over my head- a few hints would be appreciated!

I've installed XCode (version 7.3.1), gettext (v. 0.19.8.1), and reinstalled doxygen (1.8.13).

Shelnutt2 commented 6 years ago

I also ran into this problem. The issue is with newer version of cmake > 3.3 the IN_LIST policy has changed.

The simplest solution is to increase the CMAKE_MINIMUM_REQUIRED to 3.3

Copy the following text (including the blank new line at the end) to a file called cmake_patch.diff.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b802c91..fa094f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@
 #     Released under the GNU GPL
 #     
 PROJECT(MADELINE)
-CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.3)
 SET(CMAKE_CXX_STANDARD 11)
 MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)

Next apply the change with:

git apply cmake_patch.diff

You should now be able to compile on osx.

For additional details on the specifics of the IN_LIST policy issue see https://stackoverflow.com/a/44488140

piratical commented 3 years ago

This is resolved now as suggested by Shelnutt2 above.