Can anyone point me at a CMakeLists.txt example for a "GNU-style" project - project

Unfortunately, my Google search only turns up CMake - Wiki - GNU_style_example which has a broken link to the example code.
I would like to use this format/structure for my project, but I'd like to see how the CMakeLists.txt files need to be set up to compile shared/static libraries and a number of executables.
Anyone use this style for their projects that could post an example? Thanks in advance.

GNU Radio may be of interest: CMakeWork

Related

In qtcreator can I open a non-CMake project?

I like qtcreator. I need to work on a GNU-make-based project. It's a bit weird C++ project where most build rules look like
mos build directory-name
Can I use qtcreator with only the filesystem representation of the project? Or do I need to write down a very simple CMakeLists.txt? Can you give me an example of one that simply recursively lists all subdirectories?
For anyone deciding to go the recursive way, this question helps a lot.

How does cmake the package I type in find_package()

It's really common to see people writing CMakeLists.txt typing smoething like :
find_package(OpenCV)
I would like to know how does cmake know what OpenCV is?
When I check <path_to_your_cmake>/Modules ,there are lots of Find***.cmake ,but I do not see
something like FindOpenCV.cmake ,So I wonder how and where OpenCV is defined?
Thanks

Cmake generator expression: how to get TARGET_FILE property on list of targets

I am creating a custom command that packages a list of targets into a proprietary package. A simplified version is show below.
I cannot figure out how to convert the list of targets into a list of paths to the executables. This is turning out to be harder than I expected it to be, which means I'm probably headed in the wrong direction.
Looking forward to some suggestions on how to proceed.
Thank you in advance for your support!
function(package_targets name targets)
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}"
# How to make a list of paths from ${targets) using the $<TARGET_FILE:tgt> property?
COMMAND "${PACKAGER_EXE}" "$<GENERATOR_EXPRESSION_TO_BE_CREATED_HERE>"
DEPENDS ${targets}
VERBATIM)
#COMMAND_EXPAND_LISTS)
add_custom_target(${name} ALL
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${name}")
endfunction(package_targets)

Lexical or preprocessor Issue: while using flite1.4-iphone library for TTS?

I'm using
flite1.4-iphone
in my application for text to speech. I'm following this link- see here
but i get the error
Lexical or preprocessor Issue: flite.h not found
Yes i searched google for this and apply all the solutions that i found like- close Xcode and reopen, clean project etc etc, but still cant found solution.
Can anyone help me please?
Thanks.
The problem is that the compiler cannot find flite.h; looking at sfoster/iPhone TTS, it seems the file is supplied in the flite-1.4-iphone/include/ directory.
To make the compiler find the file, add the directory where flite.h is in (e.g., $(SRCROOT)/flite-1.4-iphone/include/ to the project's Header Search Paths. (see this SO Q&A for details on how to modify the path).

Flash Builder: conditional compilation - app.xml

I have a flash project that shall target different platforms. However - code is not completely the same for the different platforms.
using compiler statements and config blocks like
CONFIG::MOBILE{
...mobile specific code here...
}
I can easily maintain the different versions within the same project.
However - there should also be different mainapp-app.xml files be used for the different versions - or depending on the compiler flags different content within the mainapp-app.xml
how can I do that?
Great question. Indeed, you can create multiple config.xml files in your project and link to these config files via compiler arguments. I generally use ANT to do this as it makes the build process simple. But if you don't have ANT setup, simply right click on your project, select ActionScript Compiler and add the following to the list of additional compiler arguments:
-load-config+=config/mainapp-app.xml
Note that the config folder is relative to the project root. I generally put my config files in this folder. I wrote a detailed post on how to perform conditional compilation in AS3 on my blog. Visit http://www.willjohnson.me/blog/?p=146 for detailed instructions.
I hope this answered your question.
Regards,
Will