pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: how to build outside WRKSRC?



On 6 Aug 2010, at 19:00, Pouya D. Tafti wrote:
Thanks.  I'm not at all familiar with cmake; however, I am already
> using USE_CMAKE and CMAKE_ARGS to set various build options of
> ParaView.  But I was hoping there would exist a straightforward way to
> do an out-of-source build using pkgsrc Makefiles.  With my previous
> Makefile fragment ${WRKDIR}/ParaView-bin is created and populated
> correctly, so that running make under it would work.  But I cannot
> figure out how to tell pkgsrc to do-build there instead of under
> WRKSRC (or maybe I've got things completely backwards...).
> 
> I forgot to mention that I also tried setting WRKOBJDIR, but make
> would then complain about a recursive WRKDIR.  Then I somehow figured
> that WRKOBJDIR is meant as a global pkgsrc setting.
> 

In your Makefile you need

USE_CMAKE=      yes
CMAKE_ARG_PATH= ..
CONFIGURE_DIRS= $name_of_dir

Then you need a pre-configure or whatever stage to create the build dir

e.g.

pre-configure:
        ${MKDIR} ${WRKSRC}/_KDE_build

The above is taken from pkgsrc/meta-pkgs/kde4/Makefile.kde4.

I suggest you have a look at how the kde4 packages are set up as an example of 
how the CMAKE stuff works.

Hope that helps..

Mark


Home | Main Index | Thread Index | Old Index