trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: February 2014

Re: [trinity-devel] Slavek - where to implement: pkg_search_module( systemd )

From: "David C. Rankin" <drankinatty@...>
Date: Fri, 21 Feb 2014 16:55:33 -0600
On 02/21/2014 04:36 PM, David C. Rankin wrote:
> On 02/21/2014 04:22 PM, David C. Rankin wrote:
>> Slavek,
>>
>>   I need to implement a pkg_search_module( systemd ) in the tdebase cmake files.
>> This should probably be a generic search available to other modules. Where in
>> the TDE cmake system should this go?
>>
> 
> Slavek,
> 
>   That may not be the way to do it. I need to use some cmake magic to make sure
> systemd is installed on the system where/how would I do that in cmake? Same
> question as a preprocessor directive?
> 
> 
> 
OK,

  Decided to do it in tdebase/ConfigureChecks.cmake:

## find systemd
if( BUILD_TDM )
  pkg_search_module( SYSTEMD systemd )
  if( NOT SYSTEMD_FOUND )
    message( STATUS "\n*****\nsystemd NOT found on your system\n*****" )
  else( )
    message( STATUS "\n*****\nsystemd found on your system\n*****" )
  endif( )
endif( )

  That should provide a SYSTEMD_FOUND define. Is this the correct place? Also,
"What is the scope of SYSTEMD_FOUND?" Can I then use this during the build as a
preprocessor variable as well?

-- 
David C. Rankin, J.D.,P.E.