I'm not clear what you are trying to do.

Are you generating a list of files to compile at configuration time, or at
build time?

CMake can two things:

1. Configure a file list at configure time.
2. Run a cmake script at build time.

But you can't generate a file list at build time.  At build time, your
build system is in charge and knows absolutely nothing about CMake or
CMake library file lists.

In the particular case of Qt, there are a bunch of macros that handle
interacting with Qt's unique way of handling files. It sets up
dependencies on Qt-generated files, and inserts recipies for building the
generated files in the target build system's recipes.

If I knew what you were actually trying to do I could make suggestions.
--
Kent Williams [email protected]






On 9/25/13 11:15 AM, "Kevin Wojniak" <[email protected]> wrote:

>Hi, been searching for a while on this and can't find an answer. Maybe
>I'm just using the wrong keywords..
>
>I have a CMakeLists.txt file that creates a two libraries. I want to
>generate a list of source files that are used in each library so that I
>can run a script on these files.
>
>I cannot find a good way to do this. My best idea right now is to move
>the part of the CMake file that configures the SOURCES variable into a
>separate .cmake file and run CMake in script mode on that with a flag to
>output the variable. But that seems slightly hackish, and I don't like
>separating the file into two.
>
>Is there a better way? How do programs such as Qt Creator go about
>reading a CMake file and gathering all the source files?
>
>Thanks,
>Kevin
>
>--
>
>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



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
________________________________
--

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

Reply via email to