Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2018 14:30:49 -0700
From:      Gary Aitken <freebsd@dreamchaser.org>
To:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   CMakeLists.txt format and generation
Message-ID:  <1f3cd5c3-6861-7b03-8073-f2c402c89342@dreamchaser.org>

Next in thread | Raw E-Mail | Index | Archive | Help
Trying to build a dev version of a port, and need to tweak patch-CMakeLists.txt
to match the dev version's CMakeList.txt which is different.

It's not clear to me how these are generated.

In particular, if I look at the old one for this port, cad/freecad/files/patch-CMakeLists.txt, I see this:

--- CMakeLists.txt.orig 2017-07-28 17:35:48 UTC
+++ CMakeLists.txt
@@ -661,33 +661,7 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darw
              if (WIN32)
                  find_package(HDF5 COMPONENTS NO_MODULE REQUIRED static)
              else()
-                find_package(PkgConfig)

If I look at .../work/xxx/CMakeLists.txt.orig nothing seems to line up.
Starting at line 661, I see:

         if(UNIX OR WIN32)
             find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
...
It is not until line 699 that the above diff lines appear.

The
   @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darw
referred to on the @@ line is at line 561.
What is its significance, and must this reference be unique?
It looks like it is the closest preceeding conditional beginning at the
first char in a line.  If the new code has an intervening if() and endif(),
referencing the endif won't be unique, but the corresponding if() would be.

I've tried various tweaks and guesses but can't get make patch to accept
what I've supplied for patch-CMakeLists.txt

Any helpful hints would be much appreciated.
Thanks,

Gary



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?1f3cd5c3-6861-7b03-8073-f2c402c89342>