Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-30 Thread Richard Shaw
On Mon, Aug 27, 2018 at 12:43 PM Brad King  wrote:

> On 08/25/2018 05:48 PM, Richard Shaw wrote:
> > set(CMAKE_EXE_LINKER_FLAGS "-T${CMAKE_SOURCE_DIR}/stm32_flash.ld")
> >
> > The build dir is the binary directory, not the source directory...
>
> Toolchain files cannot reference variables like CMAKE_SOURCE_DIR
> that depend on the source and build tree locations.  They are loaded
> inside try_compile projects in addition to the main project, and those
> have their own source and build trees.
>

Ok, fixed but it's really a PITA to have to type -DCMAKE_TOOLCHAIN_FILE=..
so often when 100% of the people on this project are cross-compiling.

And I'm still being bit by differences between Fedora and Ubuntu...

Compiling is working fine again on Fedora but on Ubuntu it's failing to
find the STM32 library. I quite clearly specify its in the BINARY directory
but on Ubuntu it's still looking for it in the SOURCE directory...

set(PERIPHLIBVER1.8.0)
set(PERIPHLIBNAME   STM32F4xx_DSP_StdPeriph_Lib_V)
set(PERIPHLIBDIR${CMAKE_BINARY_DIR}/${PERIPHLIBNAME}${PERIPHLIBVER})
set(CMSIS   ${PERIPHLIBDIR}/Libraries/CMSIS)
set(STM32F4LIB  ${PERIPHLIBDIR}/Libraries/STM32F4xx_StdPeriph_Driver)
set(STM32F4TEMPLATE ${PERIPHLIBDIR}/Project/STM32F4xx_StdPeriph_Templates)
set(DSPLIB  ${PERIPHLIBDIR}/Libraries/CMSIS/DSP_Lib)

Output on Ubuntu:

 cmake -DCMAKE_TOOLCHAIN_FILE=STM32_Toolchain.cmake
~/svn/freetel/codec2-dev/stm32/-- Configuring done
CMake Error at CMakeLists.txt:134 (add_executable):
  Cannot find source file:


/home/richard/svn/freetel/codec2-dev/stm32/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/GCC/arm_fft_bin_data.c

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-25 Thread Richard Shaw
On Thu, Aug 23, 2018 at 11:58 AM Brad King  wrote:

> On 08/22/2018 04:23 PM, Richard Shaw wrote:
>
> Meanwhile you can use just
>
>   set(CMAKE_EXECUTABLE_SUFFIX ".elf")
>

Ok, interestingly that had no effect, but if I moved the
set(CMAKE_EXECUTABLE_SUFFIX_) to the main CMakeFiles.txt file below
the project() call it worked.

On Fedora, when I commented out the include for the toolchain file and
applied it on the command line I ran into an issue where it seems like
cmake doesn't understand the source directory as it no longer looked in the
right place for the linker script. In the toolchain file it's set to a
sub-directory of the source dir but it's looking in the binary dir:

set(CMAKE_EXE_LINKER_FLAGS "-T${CMAKE_SOURCE_DIR}/stm32_flash.ld")

Output:
Linking C executable cmTC_51be3.elf
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_51be3.dir/link.txt
--verbose=1
/usr/lib64/ccache/arm-none-eabi-gcc  -Wall -std=gnu11 -mlittle-endian
-mthumb -mthumb-interwork -nostartfiles -mcpu=cortex-m4
-fsingle-precision-constant -Wdouble-promotion -mfpu=fpv4-sp-d16
-mfloat-abi=hard -D__FPU_PRESENT=1 -D__FPU_USED=1 --specs=nosys.specs
 -T/home/build/build/stm32/CMakeFiles/CMakeTmp/stm32_flash.ld
CMakeFiles/cmTC_51be3.dir/testCCompiler.c.obj  -o cmTC_51be3.elf
/usr/lib/gcc/arm-none-eabi/7.1.0/../../../../arm-none-eabi/bin/ld:
cannot open linker script file
/home/build/build/stm32/CMakeFiles/CMakeTmp/stm32_flash.ld: No such file or
directory

The build dir is the binary directory, not the source directory...

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Richard Shaw
On Wed, Aug 22, 2018 at 3:02 PM Brad King  wrote:

> On 08/22/2018 03:49 PM, Richard Shaw wrote:
> > Initially I tried setting the flags before invoking "project" and that
> seemed
> > to be enough for Fedora. I've tried other things as well that I've
> probably
> > forgotten but one other method I tried was:
> >
> > set(CMAKE_REQUIRED_DEFINITIONS "--specs=nosys.specs")
>
> That's only used by Check* modules.  It does not affect flags in general.
>

Good to know, I can remove that.



> From the ubuntu issue:
>
> > The target system is: Generic - 1 - arm
> > The host system is: Linux - 4.15.0-32-generic - x86_64
>
> You're cross-compiling.  What is your CMAKE_TOOLCHAIN_FILE?
>

Yes, I could have worded it better but I have tried passing the toolchain
file on the command line with the same result. Currently I'm using an
"include" of the toolchain file prior to calling "project" since 100% of
development happens on a PC instead of having to pass the
CMAKE_TOOLCHAIN_FILE option every time.

Here's the contents:

set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_SYSTEM_VERSION 1)


# specify the cross compiler
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-cpp)

set(CMAKE_EXE_LINKER_FLAGS "-T${CMAKE_SOURCE_DIR}/stm32_flash.ld")
set(CMAKE_EXECUTABLE_SUFFIX_C ".elf")
set(CMAKE_EXECUTABLE_SUFFIX_CXX ".elf")
set(CMAKE_EXECUTABLE_SUFFIX_ASM ".elf")

# Macro for elf->bin
macro(elf2bin target)
add_custom_command(TARGET ${target}
POST_BUILD COMMAND ${CMAKE_OBJCOPY} -O binary ${target}.elf
${target}.bin
COMMENT "Creating binary for ${target}")
endmacro()

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Richard Shaw
On Wed, Aug 22, 2018 at 1:51 PM Brad King  wrote:

> On 08/21/2018 03:18 PM, Richard Shaw wrote:
> > without --specs=nosys.specs applied during compiler testing, cmake fails.
>
> How is this flag specified when invoking CMake?
>

Initially I tried setting the flags before invoking "project" and that
seemed to be enough for Fedora. I've tried other things as well that I've
probably forgotten but one other method I tried was:

set(CMAKE_REQUIRED_DEFINITIONS "--specs=nosys.specs")

but nothing seems to work. I even tried passiting the toolchain option on
the command line with the same result.



> > https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/1787723
>
> According to that discussion it works on Fedora but not on Ubuntu.
> Please try an upstream version of CMake to compare behavior.


I'll see what I can do but I'm not very Ubuntu knowledgeable. I try
download the linux binary gz file from cmake.org.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Fwd: Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Richard Shaw
On Wed, Aug 22, 2018 at 1:52 PM Brad King  wrote:

> On 08/22/2018 02:43 PM, Richard Shaw wrote:
> > Ok, I haven't gotten any responses from the user mailing list so
> hopefully someone here can help me...
>
> I responded on the user list.  It's only been one day anyway.
>

Sorry, I had emailed in July as well but I don't think I worded the problem
as well, but it got no replies.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] Fwd: Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Richard Shaw
Ok, I haven't gotten any responses from the user mailing list so hopefully
someone here can help me...

Thanks,
Richard

-- Forwarded message -
From: Richard Shaw 
Date: Tue, Aug 21, 2018 at 2:18 PM
Subject: Build flags not applied during compiler testing on Ubuntu
To: 


I have a cross platform project that I have building correctly for the
STM32 platform on Fedora but everyone using Ubuntu is having problems.

Basically, without --specs=nosys.specs applied during compiler testing,
cmake fails. I have reports of this happening on Ubuntu 14.x, 16,x and have
setup a virtual machine for 18.x.

The gory details are here:

https://bugs.launchpad.net/bugs/1787723

For the meantime, is there a way I can force cmake to apply the flags?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


[CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-21 Thread Richard Shaw
I have a cross platform project that I have building correctly for the
STM32 platform on Fedora but everyone using Ubuntu is having problems.

Basically, without --specs=nosys.specs applied during compiler testing,
cmake fails. I have reports of this happening on Ubuntu 14.x, 16,x and have
setup a virtual machine for 18.x.

The gory details are here:

https://bugs.launchpad.net/bugs/1787723

For the meantime, is there a way I can force cmake to apply the flags?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] Set flags for compiler check

2018-07-03 Thread Richard Shaw
I'm working on a cross-compiling project for the STM32F4 arm processor and
on my Fedora 28 system everything is working fine (cmake 3.11.2) but others
trying to configure are running into problems with the compiler check
failing.

Since I'm cross-compiling as far as I know I need "--specs=nosys.specs"
flag added for the compiler check to work which it is for me (relevant
output from CMakeOutput.log):

Building C object CMakeFiles/cmTC_2ac2b.dir/testCCompiler.c.o
/usr/lib64/ccache/arm-none-eabi-gcc   -Wall -std=gnu11 -mlittle-endian
-mthumb -mthumb-interwork -nostartfiles -mcpu=cortex-m4
-fsingle-precision-constant -Wdouble-promotion -mfpu=fpv4-sp-d16
-mfloat-abi=hard -D__FPU_PRESENT=1 -D__FPU_USED=1 --specs=nosys.specs-o
CMakeFiles/cmTC_2ac2b.dir/testCCompiler.c.o   -c
/home/build/build/stm32/CMakeFiles/CMakeTmp/testCCompiler.c

But others have no flags being applied (cmake 3.9.1 on Ubuntu):

Building C object CMakeFiles/cmTC_01cf5.dir/testCCompiler.c.obj
/usr/bin/arm-none-eabi-gcc-o
CMakeFiles/cmTC_01cf5.dir/testCCompiler.c.obj   -c
/home/david/codec2-dev/build_stm32b/CMakeFiles/CMakeTmp/testCCompiler.c

What is the right way to make sure flags are passed to the compiler check?

I assume I could use CMakeForceCompiler but that seems like a last resort...

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Parallel jobs failed for cmake

2015-12-09 Thread Richard Shaw
On Wed, Dec 9, 2015 at 7:32 AM, Igor Sobinov  wrote:

> Hello,
>
> I compiled cmake based project with -jN option, but failed: I got the
> following error:
>
> make[4]: warning: jobserver unavailable: using -j1.  Add `+' to parent
> make rule.
>
> How to make cmake to compile with multiple targets?
>

Are you using the ExternalProject module? A little more detail would be
helpful.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] [PATCH 0/3] FindwxWidgets improvements

2015-09-09 Thread Richard Shaw
On Sun, Sep 6, 2015 at 11:35 AM, Simon Richter 
wrote:

> Hi,
>
> three small improvements for FindwxWidgets.cmake. I've already sent these
> in May, and I've incorporated all but one of the comments I've got so far.
>
> The last remaining issue, ignoring wx-config with the wrong version if a
> specific version was requested, is difficult to implement as the version
> mismatch is detected in FPHSA, where it is too late to go back to look for
> another version.
>
> Other than that, I think these are worthwhile additions.


Thanks for the updates! I was trying to find some time to review but looks
like Brad already took care of it.

I don't suppose you'd want to help me maintain the module in a more
official capacity?  I took it because it was unmaintained and I needed some
specific changes but I'm hardly qualified and I only use it on Linux.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [CMake] Can't find wxWidgets

2015-07-10 Thread Richard Shaw
On Thu, Jul 9, 2015 at 3:09 PM, Bob Bachman bob_bach...@intercept.com
wrote:


 It's defined in the CMakeLists.txt file and stored in the CMakeCache.txt
 file.

 //Path to a program.

 wxWidgets_CONFIG_EXECUTABLE:FILEPATH=/home/mzx_bldr/mozaix_svn/engineering/c
 ommon_src/src/wxWidgets-3.0.2/buildgtk/wx-config


Ok, useful information to have...

Only thing I can think of at this point is to start adding some debug tests
such as after the above line try:

if(EXISTS ${ wxWidgetsCONFIG_EXECUTABLE})
  message(Found wx-config)
else()
  message(wx-config not found)

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Can't find wxWidgets

2015-07-09 Thread Richard Shaw
On Thu, Jul 9, 2015 at 1:19 PM, Bob Bachman bob_bach...@intercept.com
wrote:

 We've upgraded from wxWidgets 2.8.10 to 3.0.2 and our CMake scripts can no
 longer find the required wxWidgets libs. The wxWidgets shared object files
 have been built and exist in the same directory structure as the 2.8.10
 version. Any help would be greatly appreciated. Thank you


Double check that the wx-config script has not changed names... On Fedora
we allow both to be installed so on 3.X the wx-config script is renamed to
wx-config-3.0 so I have to do something like:

$ cmake -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config.3.0

and everything works as usual.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Can't find wxWidgets

2015-07-09 Thread Richard Shaw
On Thu, Jul 9, 2015 at 2:32 PM, Bob Bachman bob_bach...@intercept.com
wrote:

 Richard Shaw hobbes1069@... writes:
  Ok, so that's not what's going on... Is this a custom build of wxWidgets?
 Is wx-config located in /usr/bin or somewhere else?

 We build wxWidgets here. It's not located in /usr/bin. Here's our build
 process.

 from the wxWidgets-3.0.2 directory,
 1. mkdir buildgtk
 2. cd buildgtk
 3. ../configure --with-gtk --without-gnomeprint
 3. make

 The wx-config script is then found in the buildgtk directory.


Ok, so how did you tell cmake to find wx-config when you were running
2.8.x? It only looks in whatever the default cmake search paths...

Looking at Modules/FindwxWidgets.cmake

#-
# UNIX: Start actual work.
#-
# Support cross-compiling, only search in the target platform.
find_program(wxWidgets_CONFIG_EXECUTABLE
  NAMES wx-config wx-config-3.0 wx-config-2.9 wx-config-2.8
  DOC Location of wxWidgets library configuration provider binary
(wx-config).
  ONLY_CMAKE_FIND_ROOT_PATH
  )

---end---

Thanks,

Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Can't find wxWidgets

2015-07-09 Thread Richard Shaw
On Thu, Jul 9, 2015 at 2:10 PM, Bob Bachman bob_bach...@intercept.com
wrote:

 Richard Shaw hobbes1069@... writes:
  On Thu, Jul 9, 2015 at 1:19 PM, Bob Bachman bob_bachman-
 jxeu3b3ms+tby3ivrkz...@public.gmane.org wrote:We've upgraded from
 wxWidgets
 2.8.10 to 3.0.2 and our CMake scripts can no
  longer find the required wxWidgets libs. The wxWidgets shared object
 files
  have been built and exist in the same directory structure as the 2.8.10
  version. Any help would be greatly appreciated. Thank you
 
  Double check that the wx-config script has not changed names... On
 Fedora we
 allow both to be installed so on 3.X the wx-config script is renamed to wx-
 config-3.0 so I have to do something like:
 
  $ cmake -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config.3.0
 
  and everything works as usual.

 Okay, thanks. That doesn't seem to be the problem. The wx-config script
 located in the buildgtk directory is a soft link.

 wx-config - lib/wx/config/inplace-gtk2-unicode-3.0


Ok, so that's not what's going on... Is this a custom build of wxWidgets?
Is wx-config located in /usr/bin or somewhere else?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Problem with cross-compiling and external projects

2015-03-06 Thread Richard Shaw
I've got a cmake based project that can optionally build static versions of
most of its dependencies and it works fine on Linux and MSYS2+MinGW.

The problem is when I try to cross compile using MinGW on Linux. I would
expect cmake would be smart enough to know if the parent project is being
built with a particular toolchain that the external projects (also cmake
based) would use the same toolchain but that doesn't appear to be what's
happening.

Is there some setting I'm missing here?

I'm currently running 3.0.2 on Fedora linux but this has been happening on
2.8.X as well.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] 64 bit build of wxWidgets-2.8.12 is not found

2014-12-15 Thread Richard Shaw
On Mon, Dec 15, 2014 at 3:52 AM, Johannes Zarl johannes.z...@jku.at wrote:

 Hello Robert,

 I don't have a test-environment handy, but it seems like FindwxWidgets
 checks
 for the vc_x64 library directory prefix, not for vc_amd64:

 # /usr/share/cmake-3.0/Modules/FindwxWidgets.cmake:511:
 if(MINGW)
   set(WX_LIB_DIR_PREFIX gcc)
 elseif(CMAKE_CL_64)
   set(WX_LIB_DIR_PREFIX vc_x64)
 else()
   set(WX_LIB_DIR_PREFIX vc)
 endif()


A quick and dirty fix may be to add an additional prefix such as
WS_LIB_DIR_PREFIX2 vc_amd64

and add appropriate lines to the find_path command... It would obviously
fail for the other two conditions because PREFIX2 wouldn't be set but I
think that's a lot easier than trying to add conditionals based on the wx
version discovered.

I technically support the module but I only run Linux so I have no way to
test...

Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] Expected difference in execute_process between MSYS / UNIX

2014-10-31 Thread Richard Shaw
On Thu, Oct 30, 2014 at 2:25 PM, Brad King brad.k...@kitware.com wrote:

 On 10/30/2014 01:55 PM, Richard Shaw wrote:
  I'm working on a big update to the FindFLTK module and I'm
  testing it on all platforms I have access to.
 
  One problem that took me quite a while to figure out was that
  on *nix systems, execute_process works with shell scripts but
  on my MSYS2 install it does not, I have to prefix the command
  with sh to make sure it executes in a shell.
 
  Is this known/expected?

 Yes.  It is not execute_process, but the underlying operating
 system process launching rules.  A shell script starts in a
 shebang (#!) line that the OS knows how to interpret to
 decide what program to run to launch the script.  Windows does
 not know how to do this so we have to specify a shell explicitly.
 MSYS is Windows, not POSIX/Cygwin.


I figured as much but wanted to verify.


 Should I prefix shell scripts with sh in all cases and not
  count on it to work? Or should I test for MSYS and only prefix
  the command with sh there?

 Using 'sh' should be safe.


Good to know. Thanks!

Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] Expected difference in execute_process between MSYS / UNIX

2014-10-30 Thread Richard Shaw
I'm working on a big update to the FindFLTK module and I'm testing it on
all platforms I have access to.

One problem that took me quite a while to figure out was that on *nix
systems, execute_process works with shell scripts but on my MSYS2 install
it does not, I have to prefix the command with sh to make sure it
executes in a shell.

Is this known/expected?

Should I prefix shell scripts with sh in all cases and not count on it to
work? Or should I test for MSYS and only prefix the command with sh there?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] cmake-gui icons

2014-10-28 Thread Richard Shaw
On Tue, Oct 28, 2014 at 11:27 AM, Orion Poplawski or...@cora.nwra.com
wrote:

 There should be a series in:

 /usr/share/icons/hicolor/XxX/apps/CMakeSetup.png

 Where XxX is the resolution, eg: 32x32, 48x48,... :

 ls /usr/share/icons/hicolor
 128x128  192x192  22x22  256x256  36x36  512x512  72x72
 16x1620x2024x24  32x3248x48  64x6496x96

 You don't need all of them, but a selection is nice.

 SVG/svgz is nice too, and that goes in scalable.


I do this within the RPM spec file for packages I maintain which don't do
this for me but the idea should work the same for CMake, something like:

if(UNIX) # Or any other qualifiers/tests needed...
include(GNUInstallDirs)
set(ICON_INSTALL_PREFIX} ${CMAKE_INSTALL_DATADIR}/icons/hicolor)
set(ICON_SIZES 32x32;64x64;128x128)

foreach(_size ICON_SIZES)
install(FILES CMakeSetup${_size}.png
DESTINATION ${ICON_INSTALL_PREFIX}/${_size}/apps
RENAME CMakeSetup.png)
endforeach()

install(FILES CMakeSetup.svg DESTINATION
${ICON_INSTALL_PREFIX}/scalable/apps)
endif()

This assumes the icon size is appended to the base name.

I haven't tested this and it may well have typos but I would think this
would work.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[CMake] CPack NSIS installer no desktop icon, so don't prompt to install one

2014-10-22 Thread Richard Shaw
I'm packaging a library using the NSIS CPack installer and it does not have
any executables which require start menu links so needless to say I don't
need any desktop links.

I do want the end user to have the ability to add the location to the path
so I have that enabled but it includes a check box to create desktop links
which doesn't really do anything but I can't seem to find the right option
to suppress it.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] Fixes to the FindwxWidgets module

2014-10-21 Thread Richard Shaw
On Tue, Oct 21, 2014 at 2:51 AM, sean d'epagnier seandepagn...@gmail.com
wrote:

 Hi,

 I have recently been working on wxQT which allows wxWidgets to sit on top
 of Qt (and thus target otherwise unsupported platforms like android and ios)

 I found the FindwxWidgets module had a slight bug, but was not revealed
 until I attempted to build applications which use wxQT.  I have corrected
 it with the attached patch.

 As I use Modules/FindwxWidgets.cmake but not Modules/UsewxWidgets.cmake, I
 don't think the recent change will work, further, my change corrects more
 problems.   I believe the commit e6fa6e60f6330ddf60294a0d9a6ed4cb3f27d4c4
 is probably not needed after my patch  applied.


I'm not a REGEX expert, I usually just figure out what I need when I need
it :) The first half of the patch looks fine to me as it seems to be just
dealing with the end of a line or the last flag.

I planned on implementing the 2nd half of your patch myself but was
informed that current users may be expecting a list there which is why I
moved the conversion from ; to   in the UsewxWidgets file.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[CMake] Visual Basic support

2014-10-13 Thread Richard Shaw
Is it currently possible to build a VB project with cmake? I can't seem to
find any references to do so. I'm planning on using the bvnc compiler from
the mono package for linux.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] I broke get_preresiquites

2014-09-24 Thread Richard Shaw
Ok, I have no idea what's going on.

I'm using configure_file to put the get_preresiquites cmake script in the
binary dir...
It's running...
It's not show any errors...

It's also not finding any dependencies...

I've double and triple checked that the variable I'm using in the message
command is the same as what I'm using in get_preresiquites.

But manually running objdump gives the correct output:

$ objdump -p src/fldigi.exe | grep DLL Name:
DLL Name: ADVAPI32.dll
DLL Name: libfltk.dll
DLL Name: libfltk_images.dll
DLL Name: libgcc_s_sjlj-1.dll
DLL Name: libintl-8.dll
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
DLL Name: libpng16-16.dll
DLL Name: libportaudio-2.dll
DLL Name: libwinpthread-1.dll
DLL Name: libsamplerate-0.dll
DLL Name: SHELL32.DLL
DLL Name: libsndfile-1.dll
DLL Name: libstdc++-6.dll
DLL Name: USER32.dll
DLL Name: WS2_32.dll
DLL Name: WSOCK32.DLL

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] I broke get_preresiquites

2014-09-24 Thread Richard Shaw
I figured it out...

I'm cross-compiling MinGW on Fedora linux and it just dawned on me that the
cmake instance run by CPack probably isn't using the correct environment. I
think it would be best if this was handled automatically but for the time
being I pushed the required variables into the install script to make
GetPreresiquites work correctly, at least for the most part.

The function, get_preresiquites, has an option to exclude system libraries
but it doesn't seem to be doing that for me right now.

Thanks
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Abuse try_compile to get DLL dependencies for win32 NSIS packaging?

2014-09-23 Thread Richard Shaw
Ok, this may or may not work but I figured it was worth a try.

I'm running out of motivation to get a good method to determine which DLL's
I need to package with the install(SCRIPT...) / GetPrerequisites mess.

My current approach is to attempt to use try_compile to build a minimal
program I can link against and use GetPrerequisites with it.

 I crated an minimal do nothing c++ program and used the full linker flags
for the main program but it appears that the -Wl,--no-whole-archive is
helping me by not linking with things I don't need:

$ objdump -x getdeps.exe | grep DLL Name:
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll

Any ideas?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Modify nsis command?

2014-09-20 Thread Richard Shaw
In my continued efforts to convert a project from autotools to CMake I've
gotten to the point of creating an NSIS package.

I'm trying not to modify any existing source files and the current method
passes some defines to the nsis binary but I can't see any way to do that
with the available CPACK variables.

Anyone else run into this?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Modify nsis command?

2014-09-20 Thread Richard Shaw
On Sat, Sep 20, 2014 at 12:40 PM, Iosif Neitzke 
iosif.neitzke+cm...@gmail.com wrote:

 Which defines, for example?


I'm not sure why it matters but the projects maintains it's own nsis config
file and in there is expects that the binaries which are being packaged
(could be one, or the other, or both)  to have defines specified on the
nsis command line -DHAVE_prog.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] What is necessary for including fixes from current development branch to official release

2014-09-19 Thread Richard Shaw
On Fri, Sep 19, 2014 at 1:59 AM, Jiri Malak malak.j...@gmail.com wrote:

 Hi,

 I did a several fixes to CMake related to Open Watcom which were accepteed
 to current development
 branch a few month ago.
 Up to now they were not included to official version 3.0 branch.
 What I must do to be include or I doing something wrong?


I'd like to hear others opinions, but what I've done is once one of my
patches is accepted, as long as it applies cleanly to the current release
(and since all I mess with are modules that's usually the case) then I just
email the Fedora package maintainer and he applies it within Fedora.

You didn't mention if you were on Linux or Windows but if you're running a
Linux distro you could probably do the same.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] What is necessary for including fixes from current development branch to official release

2014-09-19 Thread Richard Shaw
On Fri, Sep 19, 2014 at 8:34 AM, Nils Gladitz nilsglad...@gmail.com wrote:

 On 09/19/2014 03:19 PM, Richard Shaw wrote:

 I'd like to hear others opinions, but what I've done is once one of my
 patches is accepted, as long as it applies cleanly to the current release
 (and since all I mess with are modules that's usually the case) then I
 just
 email the Fedora package maintainer and he applies it within Fedora.

 I personally rather dislike that distributions introduce behavior changes
 since it might result in your project not only depending on a specific
 version of CMake but also a specific variant as introduced by the
 distribution you are working on.

 It also results in people submitting issues with vanilla CMake which might
 be specific to distribution patches (e.g. [1]).


I don't disagree in theory, but what do you do if you need the fix? One of
the fixes I submitted fixed a problem with cross compiling that I'm not
sure I could have easily worked around. I don't want to sit on my hands and
wait for 3.1.

I guess I could have copied the module into my project module folder and
applied it locally, but that seems like a worse workaround than patching at
the distro level.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [CMake] dependencies

2014-09-11 Thread Richard Shaw
On Thu, Sep 11, 2014 at 9:51 AM, Vojtech Mašek shooter...@gmail.com wrote:

 Hi, I am working at team developing RPM pacage generator.
 Now I am solving a problem how can i get dependencies using cmake.
 Basically we need to get paths to libs like they are cached in
 CmakeCache.txt, is it somehow possible before calling cmake and then
 parsing the file ?


I'm a Fedora packager so I'm curious how you're going to do this.

Are you planning on running something like rpm -q --whatprovides
library to do this?

rpmbuild will generate requirements automatically as long as there is a
soname dependency, so for the most part that would be redundant except for
non-library dependencies (python, perl, php, etc. or binary dependencies).

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] Gold standard find module?

2014-09-10 Thread Richard Shaw
On Wed, Sep 10, 2014 at 4:52 AM, Stephen Kelly steve...@gmail.com wrote:

 Richard Shaw wrote:

  Everyone has been really helpful but I don't want to be a pest.
 
  Is there a specific find package module that one could point to that
 would
  be consider the gold standard of getting it right? One with sufficient
  complexity (not like the wiki example).

 Have you looked at


 http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#a-sample-find-module

 too?


Thanks, that has a little more detail, but the module I'm trying to clean
up is this one:

http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindFLTK.cmake;hb=HEAD

It does a lot of questionable things, I think much of it due to the fact
it's been unmaintained for so long and some of the newer commands were
probably not available when it was written.

One wrinkle is that you can't trust the 'fltk-config' program. If you
specify --libs it will give you the static library location even if only
shared libraries were built, so it only uses that to get the library
location, not the library itself.

The actual reason I took over the module is that it doesn't add the correct
flags (--ldstaticflags) if you ARE actually using static libraries, but
after some investigation, it really need a lot of cleanup/modernization
work and I'm not sure I'm completely qualified to be the one to do it :)

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Gold standard find module?

2014-09-10 Thread Richard Shaw
On Wed, Sep 10, 2014 at 5:29 AM, David Cole via cmake-developers 
cmake-developers@cmake.org wrote:

 I would say there are no gold standard find modules.

 The gold standard is a project config file, like Qt5 has.

 From http://www.cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html :

 the Qt 5 libraries are found using Config-file Packages shipped with Qt
 5

 Also, search this page for Config mode:

 http://www.cmake.org/cmake/help/v3.0/command/find_package.html

 Find modules in CMake should be the last resort option, when it is simply
 impossible to add a project config mode file to a project.


Yes, in fact cmake builds of FLTK actually do provide a config file and the
find module tries to locate it, but as I mentioned to Stephen, I'm just
trying to improve the current module at this point.



 On the other hand, if the intent behind your question is to make the
 existing find modules all follow a given standard. that's quite an
 ambitious goal. Let's see if anybody else names actual names for the gold
 standard.


In this case just the one. I'm not that ambitious as I'm just volunteering
my time to various FOSS projects and still have to maintain a day job to
pay the bills!

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Gold standard find module?

2014-09-10 Thread Richard Shaw
On Wed, Sep 10, 2014 at 7:18 AM, David Cole dlrd...@aol.com wrote:

  In this case just the one. I'm not that ambitious as I'm just
  volunteering my time to various FOSS projects and still have to
  maintain a day job to pay the bills!

 In that case, I would recommend just getting it into shape so that it
 works best for you. (But then, that's the way we've ended up with so
 many ways of doing things in the find modules we do have) As you
 submit changes for review, though, hopefully the reviewers will catch
 anything that is not recommended and ask you to revise it before
 pushing it into 'master'.


That's kinda what I was thinking as well but some of the problem I'm trying
to fix are requiring some significant changes that looking at a simple diff
may not really be helpful...



 I think asking specific questions when you have something you're not
 sure of is better than trying to identify a gold standard find module
 on which to model your contributions.


I'm sure I'll still have plenty of questions, I was just hoping to have a
really good example to go by to catch the easy stuff.

Although, thinking about it now I haven't found a whole lot in my googling
so perhaps the discussions here we help other future CMake users/developers.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] include(...) or find_package(...) within another Findpackage module

2014-09-09 Thread Richard Shaw
I'm working on trying to modernize the FindFLTK module but also stuck with
making sure I don't break the established behavior. The problems with the
module are extensive so I'm breaking them up into individual emails where
possible.

The part I'm questioning in this email is: Should this be include(FindX11)
as it shows or find_package(X11)?

if(UNIX)
  include(FindX11)
  find_library(FLTK_MATH_LIBRARY m)
  set(FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY})
endif()

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] Gold standard find module?

2014-09-09 Thread Richard Shaw
Everyone has been really helpful but I don't want to be a pest.

Is there a specific find package module that one could point to that would
be consider the gold standard of getting it right? One with sufficient
complexity (not like the wiki example).

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[CMake] Using PUBLIC_HEADER property to install headers, but only 1st one is installed

2014-09-05 Thread Richard Shaw
Am I doing something wrong or is this a known bug?

I have a list of about 5 headers, CODEC2_PUBLIC_HEADERS.

I used set_target_properties(library PROPERTIES PUBLIC_HEADER
${CODEC2_PUBLIC_HEADERS})

then in the install target I added:
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/codec2

When I do a make install only the first file in the list is installed...

CMake version is 2.8.12.2

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] GNUInstallDirs on Fedora problem

2014-09-04 Thread Richard Shaw
I'm hoping I'm just missing something really obvious but I recently
discovered the module GNUInstallDirs which is great. But I just tried
converting over to it on one of my projects and although my system is
definitely x86_64 the libraries are getting installed to lib not lib64.

I looked through the source and it seems the CMAKE_SIZEOF_VOID_P is being
used to make the determination.

I added a debug message to my project for CMAKE_SIZEOF_VOID_P and it shows
nothing, but per the module if it's not defined then it should show me a
warning, however if I try:

$ cmake --system-information | grep SIZEOF_VOID_P
CMAKE_SIZEOF_VOID_P 8

I get the right answer, but it's still installing to lib not lib64...

Any ideas?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[cmake-developers] Best practice for determining if a static library was found and other issues with FindFLTK.cmake

2014-09-03 Thread Richard Shaw
I'm probably going to end up taking over the module since it seems to be
un-maintained but I'm hesitant to make radical changes to it.

The module has several issues but a major one is that it doesn't add the
required linker flags when using static libraries instead of shared.

It also doesn't check for any required C flags but that's a lesser issue.

These may only be a problem for the autotools based fltk build as the
module uses a ConfigFLTK for CMake based builds.

I have the following config to work around the issue which I'd like to
ultimately get into the module and out of my cmake config:

find_package(FLTK REQUIRED)
if(${FLTK_FOUND})
include_directories(${FLTK_INCLUDE_DIRS})
# Set required CXX flags.
execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --cxxflags
OUTPUT_VARIABLE FLTK_CXXFLAGS)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${FLTK_CXXFLAGS})
# FindFLTK does not properly handle ldflags for static libraries.
get_filename_component(FLTK_LIB_EXT ${FLTK_BASE_LIBRARY} EXT)
if(${FLTK_LIB_EXT} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})

^^^ Is this the best way to determine if the library found was static or
shared? ^^^

message(STATUS Using static FLTK libraries.)
execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --use-images
--ldstaticflags
OUTPUT_VARIABLE FLTK_LDFLAGS)

^^^ The module doesn't check if the library is static, and even then it
only ^^^
^^^ runs --ldflags for the fltk images library.

separate_arguments(FLTK_LDFLAGS)
foreach(_FLAG ${FLTK_LDFLAGS})
string(REGEX MATCH ^-l.+ _LDFLAG ${_FLAG})
string(STRIP ${_LDFLAG} _LDFLAG)
list(APPEND FLTK_LIBRARIES ${_LDFLAG})
endforeach()
list(REMOVE_DUPLICATES FLTK_LIBRARIES)

^^^ This works, but is there a better way? ^^^

endif()
list(APPEND FLDIGI_LINK_LIBS ${FLTK_LIBRARIES})

So a broader question... Should we trust the output of a config program, in
this case, fltk-config? The writer of the module certainly doesn't. They
used the fltk-config program to find the base library, strip off the path
portion and then used it as a search path to find the libraries
independently.

I would like to update the module to use COMPONENTS, but the current
default is to find everything unless a FLTK_SKIP_... variable is set so I
assume there's a good way to keep backward compatibility.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Best practice for determining if a static library was found and other issues with FindFLTK.cmake

2014-09-03 Thread Richard Shaw
On Wed, Sep 3, 2014 at 9:11 AM, Brad King brad.k...@kitware.com wrote:

 On 09/03/2014 09:48 AM, Richard Shaw wrote:
  The module has several issues but a major one is that it doesn't add
  the required linker flags when using static libraries instead of shared.
 
  It also doesn't check for any required C flags but that's a lesser issue.
 
  These may only be a problem for the autotools based fltk build
  as the module uses a ConfigFLTK for CMake based builds.

 If FLTK upstream is willing to provide FTLKConfig for CMake-based
 builds then they may be willing to support providing one from
 autotools-based builds too.  It is not very hard to provide one
 from a non-CMake build system.  Qt5 and LLVM both do it.  You
 could go work with the FLTK devs to do it there too.  Then we
 won't even need a FindFLTK in CMake except for compatibility.


I did a cmake based build for cross-compiling for win32 on Fedora because
the autotools was going to be WAY too much work to get working with the
rpmbuild mingw macros and took a look at the generated cmake files.

It looks like it uses a bunch of imported targets rather than utilizing
find_library... I'm not familiar with this method so would you just use an
include(FLTKConfig) instead of find_library/find_package? And then I
would add the imported targets to target_link_libraries?


 ^^^ Is this the best way to determine if the library found was
  static or shared? ^^^

 It is not possible in general without platform-specific knowledge.
 On AIX even an archive (.a) can be a shared library, for example.
 On Windows a .dll's import library (.lib) looks just like a static
 library (.lib).  Ideally information provided with the FLTK package
 should tell us.


Hmm... no good answer here. Another reason to move away from the autotools
build... more below.


  So a broader question... Should we trust the output of a config
  program, in this case, fltk-config? The writer of the module
  certainly doesn't. They used the fltk-config program to find
  the base library, strip off the path portion and then used it
  as a search path to find the libraries independently.

 Of course the output of fltk-config should be trusted to be
 correct, but the info still needs to be transformed into what
 CMake wants.  That is usually more granular than strings of
 command-line flags for various tools, so some parsing/searching
 may be needed.


Well, after a bit more research I see why he didn't trust the output of
fltk-config. I only have the shared libraries on my fedora system but if I
run fltk-config --libs the output shows a static library:

$ fltk-config --libs
/usr/lib64/libfltk.a


 I would like to update the module to use COMPONENTS, but the
  current default is to find everything unless a FLTK_SKIP_...
  variable is set so I assume there's a good way to keep
  backward compatibility.

 The FindFLTK module was added way back in the beginning of CMake
 and has never really been modernized.  The SKIP variables may
 even predate the COMPONENTS support in find_package.


Ahh... Is it possible to support that now as long as if the user doesn't
specify COMPONENTS that it emulates the old behavior and tries to find
everything?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[CMake] Autotools-cmake: Are these checks really needed anymore?

2014-08-30 Thread Richard Shaw
In the project I'm converting to cmake there are a lot of checks for
headers and functions I've reimplemented in cmake, but it seems a lot of
autotools based programs do a lot of excessive checking and I don't want to
implement stuff that can be safely assumed on most systems.

Here's a snippet of the checks in question:

# Checks for typedefs, structures, and compiler characteristics.
#AC_C_CONST
#AC_C_INLINE
#AC_TYPE_INT16_T
#AC_TYPE_INT32_T
#AC_TYPE_INT64_T
#AC_TYPE_INT8_T
#AC_C_RESTRICT
#AC_TYPE_SIZE_T
#AC_HEADER_TIME
#AC_STRUCT_TM
#AC_TYPE_UINT16_T
#AC_TYPE_UINT32_T
#AC_TYPE_UINT64_T
#AC_TYPE_UINT8_T
#AC_C_VOLATILE

Are they safe to skip?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Autotools-cmake: Are these checks really needed anymore?

2014-08-30 Thread Richard Shaw
Thanks for the responses everyone.

I'm just volunteering to change the build system on one of my favorite
pieces of software so I don't know the code inside and out. As far as I
know linux, windows, freebsd and OSX are supported for *running* but I
believe the windows version is cross-compiled from Linux so no need to
worry about MSVC.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Autotools-CMake build error

2014-08-28 Thread Richard Shaw
I'm working on converting a project[1] from autotools to CMake and I've
gotten a lot of it working. The project HEAVILY relies on values from a
config.h but I think I've gotten the essentials covered although it took a
while.

Currently the build is failing on the following:
[ 23%] Building CXX object src/CMakeFiles/fldigi.dir/widgets/FTextRXTX.cxx.o
cd /home/build/tmp/build_fldigi/src  /usr/lib64/ccache/c++
-DBUILD_FLDIGI -DHAVE_CONFIG_H -DLOCALEDIR=\/usr/local/share/locale\
-DPKGDATADIR=\/usr/local/share\ -DUSE_HAMLIB -DUSE_PNG -DUSE_PORTAUDIO
-DUSE_PULSEAUDIO -DUSE_SAMPLERATE -DUSE_SNDFILE -DUSE_X -Wall -ffast-math
-finline-functions -I/usr/include/freetype2 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -pthread -O3 -DNDEBUG
-I/home/build/tmp/build_fldigi -I/home/build/git/fldigi/src/xmlrpcpp
-I/home/build/git/fldigi/src/fileselector
-I/home/build/git/fldigi/src/libtiniconv
-I/home/build/git/fldigi/src/irrxml -I/home/build/git/fldigi/src/include
-I/home/build/git/fldigi/src -I/usr/include/libpng16 -I/usr/include/alsa
-I/home/build/tmp/build_fldigi/src
-I/home/build/git/fldigi/src/flarq-src/include-o
CMakeFiles/fldigi.dir/widgets/FTextRXTX.cxx.o -c
/home/build/git/fldigi/src/widgets/FTextRXTX.cxx
/home/build/git/fldigi/src/widgets/FTextRXTX.cxx:252:6: error: prototype
for ‘void FTextRX::add(unsigned int, int)’ does not match any in class
‘FTextRX’
 void FTextRX::add(unsigned int c, int attr)
  ^
In file included from /home/build/git/fldigi/src/include/fl_digi.h:34:0,
 from /home/build/git/fldigi/src/widgets/FTextRXTX.cxx:47:
/home/build/git/fldigi/src/include/FTextRXTX.h:50:15: error: candidates
are: virtual void FTextRX::add(const char*, int)
  virtual void add(const char *s, int attr = RECV)
   ^
/home/build/git/fldigi/src/include/FTextRXTX.h:49:15: error:
  virtual void FTextRX::add(unsigned char, int)
  virtual void add(unsigned char c, int attr = RECV);
   ^
--- end ---

The automake line is:
g++ -DHAVE_CONFIG_H -I.  -DBUILD_FLDIGI -DLOCALEDIR=\/usr/share/locale\
-I. -I./include -I./irrxml -I./libtiniconv -I./fileselector -I./xmlrpcpp
-DPKGDATADIR=\/usr/share/fldigi\  -pthread -I/usr/include/alsa
 -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_THREAD_SAFE -D_REENTRANT-D_REENTRANT   -I/usr/include/libpng16
-pipe -Wall -fexceptions -O2 -ffast-math -finline-functions  -DNDEBUG -O2
-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
 -m64 -mtune=generic -c -o fldigi-FTextRXTX.o `test -f
'widgets/FTextRXTX.cxx' || echo './'`widgets/FTextRXTX.cxx
--- end ---

Besides a lot of extra flags enforced by Fedora, I can't seem to find the
essential difference between the two.

Can someone point me in the right direction?

I was going to put in a link to my remote branch at sourceforge but I'm not
able to push to it right now

Thanks,
Richard

[1] http://www.w1hkj.com/Fldigi.html
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Autotools-CMake build error

2014-08-28 Thread Richard Shaw
On Thu, Aug 28, 2014 at 3:39 PM, Kornel Benko kor...@lyx.org wrote:

 You use '-DHAVE_CONFIG_H', this means probably generated 'config.h'.
 Differences between generation of this file of automake/cmake?

 Could be but I think I found most of those. I tried browsing through the
code and I didn't see any #if's that would affect what code is built but I
can check again.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Autotools-CMake build error

2014-08-28 Thread Richard Shaw
On Thu, Aug 28, 2014 at 4:07 PM, Kornel Benko kor...@lyx.org wrote:

 Am Donnerstag, 28. August 2014 um 15:47:06, schrieb Richard Shaw 
 hobbes1...@gmail.com
  On Thu, Aug 28, 2014 at 3:39 PM, Kornel Benko kor...@lyx.org wrote:
 
   You use '-DHAVE_CONFIG_H', this means probably generated 'config.h'.
   Differences between generation of this file of automake/cmake?


You were right to begin with, I implemented all the HAVE_x stuff but
missed a part where it had a conditional for what version of FLTK was being
used. The FindFLTK module doesn't report the API version (fltk-config
--api-version) and upstream doesn't plan on supporting versions 1.3
anymore so I just hardcoded it into config.h.in for now.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Collecting libraries for NSIS installer

2014-08-25 Thread Richard Shaw
Ok, apparently I'm the only person that can't figure out how generator
expressions work but I worked around it using find_program to find the
resultant executable in the source directory, which I think is a really bad
way to do it, but it works.

Then I use find_library to get the full path of the library because
get_filename_component isn't working for me.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Collecting libraries for NSIS installer

2014-08-25 Thread Richard Shaw
On Mon, Aug 25, 2014 at 4:10 PM, Jean-Christophe Fillion-Robin 
jchris.filli...@kitware.com wrote:

 Hi Richard,

 Generator expression won't work in install rules. Instead, I suggest you
 simply use install(TARGET ...) for regular targets.


That explains that problem. I'm not sure if you followed the whole thread
but what I'm trying to do is collect all the dependent DLL's for packaging
into the NSIS installer. I don't think install(TARGET... will work here.

I'm using the GetPrerequisites module which needs the absolute path to the
binary/library to scan. I tried to use get_target_property but it
complained that generator expressions should be used instead, which as you
mention don't work for install rules.

I use find_program to get the full location to the generated binary which I
then pass to get_prerequisites(...) to get the required dll's.

Then I used find_library to get the location to the library for
installation purposes (win32 only).

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] [Review Request] Topic wxWidgets-cflags

2014-08-22 Thread Richard Shaw
On Fri, Aug 22, 2014 at 8:44 AM, Brad King brad.k...@kitware.com wrote:

 On 08/21/2014 03:25 PM, Richard Shaw wrote:
  So the string command should be something like:
 
  string(REPLACE ;   wxWidgets_CXX_FLAGS_str ${wxWidgets_CXX_FLAGS})
  set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS_str})

 Yes, and followed by unset(wxWidgets_CXX_FLAGS_str) to clear the
 variable to not present it to applications.

 Ok, hopefully this is better. I'm reading up on git but I still fubmble
around a bit...

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=8e702cabfb149d1c67af725a3952af7034a2981d

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [Review Request] Topic wxWidgets-cflags

2014-08-22 Thread Richard Shaw
On Thu, Aug 21, 2014 at 2:21 PM, Brad King brad.k...@kitware.com wrote:

 On 08/21/2014 02:30 PM, Richard Shaw wrote:
 if   (wxWidgets_CXX_FLAGS)
  +# Flags are expected to be a string here, not a list.
  +string(REPLACE ;   wxWidgets_CXX_FLAGS ${wxWidgets_CXX_FLAGS})
   set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS})

 Thanks.  However, we shouldn't leak our local modification to the value
 of wxWidgets_CXX_FLAGS, so the substitution should be done with the
 result stored in a temporary local variable.

 Also, please start the commit message in UsewxWidgets: 

 Ok, all updates have been incorporated, so I'm looking for an ACK to know
if it appears ready to push into next.

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=e6fa6e60f6330ddf60294a0d9a6ed4cb3f27d4c4

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] [Review request] FindwxWidgets: Improve path detection logic when cross-compiling.

2014-08-22 Thread Richard Shaw
Simple logic update to check if we're cross-compiling to determine if unix
or win32 path find style should be used.

FindwxWidgets: Improve path detection logic when cross-compiling.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [Review request] FindwxWidgets: Improve path detection logic when cross-compiling.

2014-08-22 Thread Richard Shaw
On Fri, Aug 22, 2014 at 12:08 PM, Brad King brad.k...@kitware.com wrote:

 On 08/22/2014 12:39 PM, Richard Shaw wrote:
  Simple logic update to check if we're cross-compiling to determine if
 unix or win32 path find style should be used.
 
  FindwxWidgets: Improve path detection logic when cross-compiling.
 [snip]
  +else(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING)
  +  set(wxWidgets_FIND_STYLE unix)
  +endif(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING)

 Please use empty else() and endif().  Otherwise, looks good.

 Fixed:

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=33286235048495ceafb636d549d9a4e8891967ae

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] Self Introduction and fixes to the FindwxWidgets module

2014-08-21 Thread Richard Shaw
Hello CMake developers!

I just recently got my arm twisted^H^H^H^H I mean volunteered to take over
maintenance of the FindwxWidgets module which I use quite frequently. I'm
not a developer strictly speaking but I've been a Fedora linux packager for
over 3 years now (where did the time go?).

My first package was OpenCOLLADA which uses CMake as it's build system and
that's where I first cut my teeth on CMake. Now I maintain dozens of
packages and whenever i have to fix something I always breath a sigh of
relief when it's cmake based rather than autotools based.

I also recently (within the last year) converted a project[1] from
autotools and manual makefiles to CMake, which was quite a learning
experience. It's actually the primary reason I'm interested in making
improvements to the wxWidgets module.

Now to my problem/question:

There are two bugs open for the module, one around path type detection
(unix or win32)[2] and one for processing of CFLAGS[3]

The solution to bug 15087 I think is settled so my question is around bug
11296.

The problem is it doesn't take into account whether you're cross-compiling
for path type detection. There is a solution that works provided in the bug
which I intend to implement but I had some other observations:
1. The 2nd if statement seems superfluous. If the path type is not win32
then it must be unix, correct? While I *think* all the platforms are
covered, the conditional logic still technically leaves the opportunity for
both conditionals to be false and then it doesn't set the path type at all.

In this case I intend to just remove the 2nd if clause.

2. The user has no manual override. I would think capability detection
would be a much better approach than platform detection but I'm not sure
how to implement it. For the meantime and to not make too disruptive of a
change to the logic that's been out there for so long I think it would be
good to provide a way for the user to override the path type.

Is there a preferred/good practices way to implement this?

Thanks,
Richard Shaw

[1] http://freedv.org
[2] http://www.cmake.org/Bug/view.php?id=11296
[3] http://www.cmake.org/Bug/view.php?id=15087
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] [Review Request] Topic wxWidgets-cflags

2014-08-21 Thread Richard Shaw
This is a dead simple change but it's also my first commit so I figured I
would request a review.

All this commit does is make sure if multiple cflags are received from the
wx-config utility that it be converted back into a string so gcc doesn't
choke on it.

Since it's short enough I guess it would be useful to post the commit here:

commit 873ad28a305b718e09b97d9a287c0c5c162766c0
Author: Richard M. Shaw hobbes1...@gmail.com
Date:   Thu Aug 21 12:45:42 2014 -0500

Make sure cflags in UsewxWidgets are a string, not a list.

diff --git a/Modules/UsewxWidgets.cmake b/Modules/UsewxWidgets.cmake
index f2f260d..7c1f925 100644
--- a/Modules/UsewxWidgets.cmake
+++ b/Modules/UsewxWidgets.cmake
@@ -88,6 +88,8 @@ if   (wxWidgets_FOUND)
   endif()

   if   (wxWidgets_CXX_FLAGS)
+# Flags are expected to be a string here, not a list.
+string(REPLACE ;   wxWidgets_CXX_FLAGS ${wxWidgets_CXX_FLAGS})
 set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS})
 MSG(wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS})
   endif()
--- end ---

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [Review Request] Topic wxWidgets-cflags

2014-08-21 Thread Richard Shaw
On Thu, Aug 21, 2014 at 2:21 PM, Brad King brad.k...@kitware.com wrote:

 On 08/21/2014 02:30 PM, Richard Shaw wrote:
 if   (wxWidgets_CXX_FLAGS)
  +# Flags are expected to be a string here, not a list.
  +string(REPLACE ;   wxWidgets_CXX_FLAGS ${wxWidgets_CXX_FLAGS})
   set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS})

 Thanks.  However, we shouldn't leak our local modification to the value
 of wxWidgets_CXX_FLAGS, so the substitution should be done with the
 result stored in a temporary local variable.


So the string command should be something like:

string(REPLACE ;   wxWidgets_CXX_FLAGS_str ${wxWidgets_CXX_FLAGS})
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS_str})


Also, please start the commit message in UsewxWidgets: 


Ahh, I see how that would be helpful!

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [CMake] Collecting libraries for NSIS installer

2014-08-20 Thread Richard Shaw
On Tue, Aug 19, 2014 at 11:40 AM, Hendrik Sattler p...@hendrik-sattler.de
wrote:



 On 19. August 2014 16:36:14 MESZ, David Cole via CMake cmake@cmake.org
 wrote:
  Definitely getting warmer! It looks like that GetPrerequistes only
  works on an existing target so I'm thinking I would have to set this
  up as a super cmake project after the main project is already
 built?
 
 Right, or as a script that runs at install time. It requires an
 executable file to analyze, so it can come up with the required DLLs.

 Actually I wonder why this is needed?
 If all libraries are linked will full path or via imported targets (those
 that do it right on windows), why do the binaries have to be checked


Yes, the more I look at this the more I realize it's not going to work. The
script method is going to install the required libraries, in my case on
win32 no one is going to run make install it's instead going to be make
package.

I guess what I need is a way to translate the import libraries into the
runtime dll paths. The .a is easy enough to handle in regex, but in most
cases the import library is in /usr/lib and the runtime library is in
/usr/bin. Is there a property I can interrogate to get there?

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Collecting libraries for NSIS installer

2014-08-20 Thread Richard Shaw
Ok, that being the case I tried it out. There's two things I'm doing
differently than the only example[1] I found:

1. Using install(CODE...) instead of install(SCRIPT...), shouldn't work any
differently, right?
2. The example is from 2009 and uses:

GET_TARGET_PROPERTY(MY_BINARY_LOCATION my_binary LOCATION)

Which I get a policy warning about.

I tried using $TARGET_FILE:freedv inside of get_but apparently I'm not
getting how that's supposed to be used.

Here's the whole code block:
if(WIN32)
install(CODE 
INCLUDE(GetPrerequisites)
GET_PREREQUISITES($TARGET_FILE:freedv DEPENDENCIES 1 1 \\ \\)
message(\Checking for dependencies in $TARGET_FILE:fredv\)
message(\Dependencies: ${DEPENDENCIES}\)
FOREACH(DEPENDENCY ${DEPENDENCIES})
   GET_FILENAME_COMPONENT(DEPENDENCY_NAME \${DEPENDENCY}\ NAME)
   GET_FILENAME_COMPONENT(DEPENDENCY_ACTUAL \${DEPENDENCY}\ REALPATH)
   message(\DEPENDENCY_NAME: ${DEPENDENCY_NAME}\)
   message(\DEPENDENCY_ACTUAL: ${DEPENDENCY_ACTUAL}\)
   FILE(INSTALL
 DESTINATION bin
 TYPE EXECUTABLE
 RENAME \${DEPENDENCY_NAME}\
 FILES \${DEPENDENCY_ACTUAL}\
 )
ENDFOREACH()
)
endif(WIN32)
--- end ---

Ideas?

Thanks,
Richard

[1] http://www.cmake.org/pipermail/cmake/2009-June/029975.html
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Collecting libraries for NSIS installer

2014-08-20 Thread Richard Shaw
Ok, short answer to #1, no you can't use install(CODE because all your
cmake variables we be evaluated now instead of later.

Same problem though when I use install(SCRIPT...

Run CPack packaging tool...
CPack: Create package using NSIS
CPack: Install projects
CPack: - Run preinstall target for: FreeDV
CPack: - Install project: FreeDV
warning: target '$TARGET_FILE:freedv' is not absolute...
warning: target '$TARGET_FILE:freedv' does not exist...
C:/msys32/mingw32/bin/objdump.exe: '$TARGET_FILE:freedv': No such file
Dependencies:

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Collecting libraries for NSIS installer

2014-08-19 Thread Richard Shaw
I have a project where I currently have a dumb list of libraries to package
with the NSIS installer so the program will work under win32. It really
only works for one setup (currently Fedora mingw) with some prebuilt
libraries downloaded, others provided through Fedora, and others I build
myself. This is not very portable to say the least.

Is there an easy way when after find_library(...) or find_package(...) to
collect the appropriate libraries for the NSIS installer? Some of the
dependencies might be static libraries which I need to ignore, but the
others will be DLL's which I need to pull into the installer.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] CPack patch version getting set erroneously...

2014-08-04 Thread Richard Shaw
I converted a project from autotools/handmade makefiles to cmake and
afterwards I added NSIS packaging for win32 builds via the cpack
integration.

Everything was fine while the version patch level was being used, but upon
the next release 0.97 w/o a patch level the resultant installer has the
show 0.97.1.

Here's the logic I use:
set(CPACK_PACKAGE_VERSION_MAJOR ${FREEDV_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${FREEDV_VERSION_MINOR})
if(FREEDV_VERSION_PATCH)
set(CPACK_PACKAGE_VERSION_PATCH ${FREEDV_VERSION_PATCH})
endif(FREEDV_VERSION_PATCH)

Although I have also tried unset(... to get it to stop but nothing seems
to work. The resultant file always ends up with at 1 in the patch level.

Thanks,
Richard
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Testing for a target broke for me

2013-12-20 Thread Richard Shaw
Ok, I didn't notice my replies going to Norman only, apologies.

Answer from upstream is that it returns true if the target exists, it does
not care from a ExternalProject POV that the target has been built. The
documentation has been clarified.

I have it working properly now testing for the existence of wx-config which
will only exist if it's been built.

Thanks,
Richard
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Testing for a target broke for me

2013-12-12 Thread Richard Shaw
I've had this working and I don't *THINK* I changed anything that would
cause it to fail now but I'm not completely sure.

I have a project I converted over to cmake from automake which requires
wxWidgets 3.0 (or the 2.9 devel branch). Although it just released I still
want to maintain the ability to build it within the project itself for
distro's that are slow to adopt it (on linux) or windows/mac as well.

Because wxWidgets uses a custom script to get compiler flags and includes I
have to bootstrap the build such that the first time you run cmake/make
it builds wxWidgets and the second time it builds the project. To that end
I had the follow strategy working:

#
# Pull in external wxWidgets target if performing static build.
#
if(BOOTSTRAP_WXWIDGETS)
include(cmake/BuildWxWidgets.cmake)
endif(BOOTSTRAP_WXWIDGETS)

#
# Perform bootstrap build of wxWidgets
#
if(BOOTSTRAP_WXWIDGETS AND NOT TARGET wxWidgets)
message(STATUS Will perform bootstrap build of wxWidgets.
   After make step completes, re-run cmake and make again to perform FreeDV
build.)
#
# Continue normal build if not bootstrapping wxWidgets or already built it.
#
else(BOOTSTRAP_WXWIDGETS AND NOT TARGET wxWidgets)

continue normal build

endif(BOOTSTRAP_WXWIDGETS AND NOT TARGET wxWidgets)
---

Even though I can verify that BOOTSTRAP_WXWIDGETS is true, it's failing the
conditional and I can only assume it has to do with the target checking.

Any ideas?

Thanks,
Richard
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Testing for a target broke for me

2013-12-12 Thread Richard Shaw
On Thu, Dec 12, 2013 at 11:20 AM, Williams, Norman K 
norman-k-willi...@uiowa.edu wrote:

 This is a case for ExternalProjects.
 http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html


I've read that before but didn't find anything new there. I also tried
checking the state of BOOTSTRAP_WXWIDGETS and the target separately and
both individually seem to test correctly.

It seems the problem is:
if(BOOTSTRAP_WXWIDGETS AND NOT TARGET wxWidgets)

though I don't see anything semantically wrong with it.


Also search for 'cmake superbuild' for discussion of how people are using
 external projects.

 An example build setup for prerequisites/projects here:
 https://github.com/BRAINSia/NamicExternalProjects


Very interesting but not quite what I'm looking for, in this case the main
CMakeLists.txt does actually build a project, I just need it to build
wxWidgets first.

Thanks,
Richard
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Running find_package after dependencies are built

2013-10-18 Thread Richard Shaw
On Fri, Oct 18, 2013 at 6:34 AM, Olaf Ryder devbit...@gmail.com wrote:

 Here's the problem I'm trying to solve:

 * External Project A has no dependencies and generates LibraryA
 * External Project B is dependent on LibraryA


I worked around a similar issue to this with a project that required
wxWidgets, which using a binary to build the compile and linker flags
rathern than pkgconfig or other method.

I wrapped my whole main project in a if(NOT BOOTSTRAP_WXWIDGETS) build
the project. If BOOTSTRAP_WXWIDGETS it true, then it skips the main build
and builds wxWidgets instead. You still have to run cmake and make twice,
but it works.

http://sourceforge.net/p/freetel/code/HEAD/tree/fdmdv2/CMakeLists.txt

Richard
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Detecting libgcc_s_variant in MinGW 32 64.

2013-10-13 Thread Richard Shaw
I have a project I successfully built under mingw32 and I'm now attempting
to build under mingw64.

I am cross compiling under Fedora x86_64...

In order to pull in all the DLLs for CPack I devised the following:

# Try to grab all the runtime dlls for the windows installer.
# This will break if the dll names change!
foreach(RUNTIME
libgcc_s_sjlj-1.dll
libgcc_s_seh-1.dll
libstdc++-6.dll
libsndfile-1.dll

message(STATUS Checking for ${RUNTIME})
find_library(${RUNTIME}_LIB NAMES ${RUNTIME})
if(${RUNTIME}_LIB-FOUND)
message(STATUS runtime found: ${${RUNTIME}_LIB})
list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${${RUNTIME}_LIB})
else()
message(STATUS ${RUNTIME} not found. Hope nothing breaks!)
endif()
endforeach()

The problem is that two different libgcc_s library variants are used...
libgcc_s_sjlj-1.dll w/ mingw32
libgcc_s_seh-1.dll w/ mingw64

I could take them out of the foreach loop and check for them separately but
I was looking for something a bit more elegant which is why I added the
NAMES modifier to find_library.

Is there a way to pass both to the find_library macro? I tried making them
a list but then foreach iterated over them. I tried putting them in quotes
but then it treats them as a string...

Ideas?

Thanks,
Richard
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Windows NSIS installer shared libraries

2013-06-14 Thread Richard Shaw
Ack, something about this list confuses gmail and it always goes to the
poster instead of the list apologies.

On Fri, Jun 14, 2013 at 1:07 AM, J Decker d3c...@gmail.com wrote:

 I think something like
 if( NOT UNIX )
 install( TARGETS x RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
ARCHIVE DESTINATION lib
 )
 else()
 if( NOT UNIX )


I don't think you need the if(NOT UNIX) stuff... IIRC windows runtime dll's
(not the import libraries) are treated as runtimes, so they would
automatically go in with the binaries, so the OP just needs to make sure a
runtime destination is set.

Thanks,
Richard
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Where to put generated files.

2013-06-12 Thread Richard Shaw
On Wed, Jun 12, 2013 at 2:30 PM, William McKenzie wsmck...@cartewright.com
 wrote:

 Just wondering what the common convention is here. If I have some
 generated c/c++ source files, say from gSoap or Lex/Yacc (and my build
 rules take care of the generation), is the convention to generate these
 into the build folder, or the original source folder? I understand I could
 use either, and in some ways it makes more sense for them to go into the
 build folder. But it also feels a little weird that all of my c files are
 not in the same place if I do that.


Looks like you already got your answer, but to add my $0.02...

I'm working on converting  a project from autotools to cmake and it has
pre-generated source files so you have to generate them which is useful for
cross-compilation if you don't want to import native targets for the
generation. Since I don't want to write to the source directory *at all*
because it's an active svn working directory, I use the build directory.

Richard
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Cross-platform build under Windows targeting Linux

2013-06-10 Thread Richard Shaw
On Mon, Jun 10, 2013 at 2:06 PM, Matthew Woehlke 
matthew.woeh...@kitware.com wrote:

 On 2013-06-10 04:52, setareh S wrote:

 Now, I want to build my code for Linux platform(GNU/Linux) on a Win32
 platform. I tried doing the above procedure using CMake combined with
 Cygwin and using gcc and g++ as compilers. It built fine, created
 makefiles, and when I issued make in Cygwin terminal, the generated
 makefiles were made. Now I have got an executable which I was hoping
 would run on Linux platform. But on Linux I get the error: bash cannot
 execute binary file.

 Using command file executablename, I realized the executable which is made
 by the above procedure is of type PE32 which is only for Windows.


 Are the compilers you are using cross-compilers, or the ones that came
 with cygwin? The normal cygwin gcc/g++ compilers target cygwin on win32 and
 are not cross-compilers.


DISCLAIMER: I'm not that familiar with cross-compiling BUT...

I think in general cross compiling from windows to linux is a bad idea.
Most distro's prefer to use the system installed libraries to build with
and link to, which you will not be able to do which pretty much leaves a
100% static build.

If you really want to do it then take a look here:

http://stackoverflow.com/questions/4769968/c-cross-compiler-from-windows-to-linux
Richard
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Pull in project version number from file

2013-06-06 Thread Richard Shaw
I'm working on converting a small project from autotools to cmake and one
of the final nit-pick issues is that the version of the software is defined
in a file, version.h as #defines.

I haven't been able to find the magic incantation of file(READ...,
string(REGEX MATCH... to parse the version numbers. I did request that the
version be managed within the cmake config but that was not accepted.

The meaningful entries in version.h are:

#define FREEDV_VERISON_MAJOR 0
#define FREEDV_VERSION_MINOR 96
#define FREEDV_VERSION_PATCH 3
#define FREEDV_VERSION_SUFFIX Beta

Any hints would be appreciated.

Thanks,
Richard
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake