[CMake] Setting up Visual Studio project structure

Michael Bieber onsager at gmx.net
Mon Mar 26 05:03:54 EST 2007


@list,

I'm a new cmake user with a history in using qmake. The following seems
a FAQ to me, but I'm still unable to find a solution:

I have a 100 KLOC project here, splitted in some static libs and a single
executable.

Simplified source tree:

./lib_0
  |
  |- basic
  |- gui
  |- other_stuff_encapsulated_to_a_directory

./lib_1
  |
  |- basic
  |- similar_to_lib_0
      |- sub_topic
           |-subsub_topic

...
./lib_n
./executable

qmake is able to write VS projects for every lib and the executable
preserving the given directory structure. How can I achieve the same thing
with cmake? My globbing attempts turned the structure into plain
header/source source groups.

Requirements:
I would like use GLOB_RECURSE and not clutter every single subdirectory with
CMakeLists.txt files (a top-level file per lib is ok).
I would even like it not to provide hand-written SOURCE_GROUPs. GLOB_RECURSE
seems to be the closest thing compared to qmake's project mode.

Micha
-- 



More information about the CMake mailing list