Someone suggested python as default build option (Was: Dropping support for Hugin on Mac OS X 10.4 (Tiger) and PCC hardware)

43 views
Skip to first unread message

Harry van der Wolf

unread,
Apr 25, 2012, 7:20:31 AM4/25/12
to hugi...@googlegroups.com
Of course I know who that "someone"  was ;)

Op 15 april 2012 11:14 schreef Kornel Benko <Kornel...@berlin.de> het volgende:

> Happy bundling. Hope it works out this time... it's really frustrating
> how hsi/hpi seems to compile and run just fine on all platforms, but
> so far there's only a few linux packages containing it.


I propose to make it the default.
       CMakeLists.txt:311
               --> OPTION(BUILD_HSI "Python Scripting Interface" ON)



Cmake in its CMakeLists.txt tests for the build platform anyway (WIN32, __APPLE__, LINUX, UNIX, GNU, etc).
Why not make it a default on Linux, or even better on unix:

  if (UNIX)
  then
    option(BUILD_HSI ON)
  elif
    option(BUILD_HSI OFF)
 fi

 You should of course also check if the cmake command line option has been overriden by the parameter "-DBUILD_HSI=0 | 1 | OFF | ON"

In that case everyone on unix, bss, linux has his/her python enabled Hugin if he/she runs a default "cmake <src folder>".

Isn't that the most easy and pragmatic solution?

Harry

Kornel Benko

unread,
Apr 25, 2012, 7:40:05 AM4/25/12
to hugi...@googlegroups.com
Am Mittwoch, 25. April 2012 um 13:20:31, schrieb Harry van der Wolf <hvd...@gmail.com>

I am all for this. But someone has to commit it. Would you?

Kornel

signature.asc

Harry van der Wolf

unread,
Apr 25, 2012, 8:40:48 AM4/25/12
to hugi...@googlegroups.com


Op 25 april 2012 13:40 schreef Kornel Benko <Kornel...@berlin.de> het volgende:


That's OK with me but lets wait a few more reactions. Just to make sure that it really works on other linux/bsd/unix variants as well.
I'm also on Ubuntu (server and old laptop) and I know it works fine on Ubuntu. I don't know for Slackware, Suse, Mint, etc and {Net, Free, Open}bsd.

Harry

Harry van der Wolf

unread,
Apr 25, 2012, 8:48:19 AM4/25/12
to hugi...@googlegroups.com


Op 25 april 2012 14:40 schreef Harry van der Wolf <hvd...@gmail.com> het volgende:



That's OK with me but lets wait a few more reactions. Just to make sure that it really works on other linux/bsd/unix variants as well.
I'm also on Ubuntu (server and old laptop) and I know it works fine on Ubuntu. I don't know for Slackware, Suse, Mint, etc and {Net, Free, Open}bsd.

Harry


And with "that" in "that works fine on.." I mean the python interface, not the coding in CMakeListst.txt.
Sorry if I caused confusion.

Harry

Lukáš Jirkovský

unread,
Apr 25, 2012, 10:08:45 AM4/25/12
to hugi...@googlegroups.com
On 25 April 2012 14:40, Harry van der Wolf <hvd...@gmail.com> wrote:
>
> That's OK with me but lets wait a few more reactions. Just to make sure that
> it really works on other linux/bsd/unix variants as well.
> I'm also on Ubuntu (server and old laptop) and I know it works fine on
> Ubuntu. I don't know for Slackware, Suse, Mint, etc and {Net, Free,
> Open}bsd.
>
> Harry

I'm OK with that, I'm already enabling it in my Arch Linux hugin-hg PKGBUILD.

Lukas

Bruno Postle

unread,
Apr 25, 2012, 12:16:35 PM4/25/12
to hugi...@googlegroups.com

On 25 Apr 2012 15:08, "Lukáš Jirkovský" <l.jir...@gmail.com> wrote:
>
> I'm OK with that, I'm already
> enabling it in my Arch Linux
> hugin-hg PKGBUILD.

Building Hugin with python enabled doesn't cause any problems on fedora. The fedora packages already have it.

--
Bruno

Harry van der Wolf

unread,
Apr 29, 2012, 4:30:09 AM4/29/12
to hugi...@googlegroups.com
I need a cmake expert or at least someone who is not a cmake dummy like me.

Like in the first mail I want to implement something like:
if (UNIX)
  then
    option(BUILD_HSI "Python Scripting Interface" ON)
  elif
    option(BUILD_HSI "Python Scripting Interface" OFF)
 fi

It's of course simple to switch it on for Unix (or linux), but I also need to check whether the "-DBUILD_HSI=" option itself has been set.

Checking on something like "IF(NOT BUILD_HSI)" displays whether someone has not set it (forgot to set it) or deliberately switched it off.
"cmake .." gives the same result as as "cmake -DBUILD_HSI=off .." setting.

How do I check if someone deliberately specified -DBUILD_HSI=off (or -DBUILD_HSI=0) because he/she doesn't want to build the hsi module?

And of course: If you have access to the trunk: Feel free to apply the patch yourself.

Hoi,
Harry

Harry van der Wolf

unread,
Apr 29, 2012, 4:36:26 AM4/29/12
to hugi...@googlegroups.com


2012/4/29 Harry van der Wolf <hvd...@gmail.com>

Of course it needs to be:
IF(UNIX)

    option(BUILD_HSI "Python Scripting Interface" ON)
ELSE(UNIX)

    option(BUILD_HSI "Python Scripting Interface" OFF)
ENDIF(UNIX)

I was working on this cmake stuff yesterday evening and didn't succeed, not even after long googling.
Today  I'm working on shell scripts and instead of copying the cmake code from the CMakeList.txt, I typed the "cmake code" directly into this mail using shell coding style.
Sorry.

Harry

Kornel Benko

unread,
Apr 29, 2012, 5:02:14 AM4/29/12
to hugi...@googlegroups.com
Am Sonntag, 29. April 2012 um 10:30:09, schrieb Harry van der Wolf <hvd...@gmail.com>
> I need a cmake expert or at least someone who is not a cmake dummy like me.
>
> Like in the first mail I want to implement something like:
> if (UNIX)
> then
> option(BUILD_HSI "Python Scripting Interface" ON)
> elif
> option(BUILD_HSI "Python Scripting Interface" OFF)
> fi
>
> It's of course simple to switch it on for Unix (or linux), but I also need
> to check whether the "-DBUILD_HSI=" option itself has been set.
>
> Checking on something like "IF(NOT BUILD_HSI)" displays whether someone has
> not set it (forgot to set it) or deliberately switched it off.
> "cmake .." gives the same result as as "cmake -DBUILD_HSI=off .." setting.

Of course it uses the already cached values. The line in CMakeLists.txt specifies only the default value.

> How do I check if someone deliberately specified -DBUILD_HSI=off (or
> -DBUILD_HSI=0) because he/she doesn't want to build the hsi module?

You cannot check that easy. But in this case the option _is_ overridden by the command line.

> And of course: If you have access to the trunk: Feel free to apply the
> patch yourself.

Will do if no one objects.

> Hoi,
> Harry
>

Kornel
signature.asc
Reply all
Reply to author
Forward
0 new messages