root/simulator/trunk/CMakeLists.txt

Revision 1449, 5.6 kB (checked in by sehenley, 7 months ago)

Clean tabs, line endings - etc.

Line 
1 #    OSRail -- a network enabled railroad operations simulator and utilities
2 #    Copyright (C) 2007,2008,2009,2010 Samuel E. Henley sehenley@comcast.net
3 #
4 #    This program is free software; you can redistribute it and/or modify
5 #    it under the terms of the GNU General Public License as published by
6 #    the Free Software Foundation; either version 2 of the License, or
7 #    (at your option) any later version.
8 #
9 #    This program is distributed in the hope that it will be useful,
10 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 #    GNU General Public License for more details.
13 #
14 #    You should have received a copy of the GNU General Public License along
15 #    with this program; if not, write to the Free Software Foundation, Inc.,
16 #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 #
18 #
19 #----------------------------------------------------------------------
20 ## \file
21 ## \page osrailcmakelists Top CMakeLists.txt File.
22 ## This is the top cmakelist.txt, it builds the documentation.
23 ## RUN_TESTS, ALL_BUILD are automatically attached to this script.
24 ## \par Sets
25 ##  - SIMULATOR_WORKING_DIRECTORY
26 ##
27 ## \par Includes
28 ## ${SIMULATOR_WORKING_DIRECTORY}/Modules/prerequisite.cmake
29 ##
30 ## \par Builds
31 ## - All Documentation (html)
32 ## - Simulator
33 ## - Utilities
34 ## = Common Libraries
35 #----------------------------------------------------------------------
36 ##
37 ## \par Sets
38 ## SIMULATOR_WORKING_DIRECTORY
39 ## SIMULATOR_WORKING_BINARY_DIRECTORY
40 ##
41
42 PROJECT( OSRail )
43
44 # FILE( TO_NATIVE_PATH ... -- requires 2.4
45 CMAKE_MINIMUM_REQUIRED( VERSION 2.6.3 )
46
47
48 # Get Working Directory trunk tag branch
49
50 IF( NOT SIMULATOR_WORKING_DIRECTORY )
51
52     SET( SIMULATOR_WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
53          CACHE PATH
54          "The working directory is trunk, or a tag or a branch name."
55     )
56
57     SET( SIMULATOR_WORKING_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin
58          CACHE PATH
59          "Common binary path for OSRail"
60     )
61
62 ENDIF( NOT SIMULATOR_WORKING_DIRECTORY )
63
64 IF( NOT SIMULATOR_WORKING_DIRECTORY )
65
66     MESSAGE( FATAL_ERROR "This script is top cmake script - should be in the tag/trunk/branch directory ${OSRail_SOURCE_DIR}." )
67
68 ENDIF( NOT SIMULATOR_WORKING_DIRECTORY )
69
70 IF( NOT SIMULATOR_WORKING_BINARY_DIRECTORY )
71
72     MESSAGE( FATAL_ERROR "This script is top cmake script - should be in the tag/trunk/branch directory ${SIMULATOR_WORKING_BINARY_DIRECTORY}." )
73
74 ENDIF( NOT SIMULATOR_WORKING_BINARY_DIRECTORY )
75
76 INCLUDE( ${SIMULATOR_WORKING_DIRECTORY}/Modules/prerequisite.cmake )
77
78 ## \remarks
79 ## The trunk/tag/branch directory should be in the next directory up,
80 ## this file being in src. The DoxyFile configure file should be in
81 ## the next directory up ${SIMULATOR_WORKING_DIRECTORY}.
82 ## Assumes that this custom target is executed in the "generator"
83 ## ${SIMULATOR_WORKING_DIRECTORY}/"generator"/bin directory and that cmakefilter.exe
84 ## and cmdbatfilter.exe are in the ${SIMULATOR_WORKING_DIRECTORY}/"generator"/bin/debug directory.
85
86 FILE( TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/DoxyFile ONE )
87
88 CONFIGURE_FILE( ${SIMULATOR_WORKING_DIRECTORY}/Doxyfile.in
89                 ${ONE}
90 )
91
92 ## \note Global/Director/Target  property CODEBLOCKS_CONFIGURED_FILES = is a list
93 ## of files  that are the source for a generated source file or script - this is a clue
94 ## to programmer not to edit a generate${CMAKE_CURRENT_SOURCE_DIR} file but edit it's source and re-configure.
95 ## Files are cumulative from global, directory to target.
96
97 SET_PROPERTY( GLOBAL
98               PROPERTY CODEBLOCKS_CONFIGURED_FILES ${SIMULATOR_WORKING_DIRECTORY}/Doxyfile.in
99 )
100
101 ADD_CUSTOM_TARGET( DOCUMENTATION
102     ${DOXYGEN_EXECUTABLE} ${ONE}
103 )
104
105 ## \note CodeBlocksGenerator CMake Directory Property CODEBLOCKS_WORKSPACE_EXCLUDE_GROUP will
106 ## remove the project files for a group ( Executable, Static_library, Shared_library
107 ## Module_library, Utility, Global_target, Install_files, Install_programs, Install_directory )
108 ## from the workspace file.
109 ##
110
111 SET_PROPERTY( DIRECTORY ${OSRail_BINARY_DIRECTORY}
112               PROPERTY CODEBLOCKS_WORKSPACE_EXCLUDE_GROUP Utility
113 )
114
115 ## \note CodeBlocksGenerator CMake Directory Property CODEBLOCKS_PROJECT_EXCLUDE_GROUP will
116 ## prevents the project files for a group ( Executable, Static_library, Shared_library
117 ## Module_library, Utility, Global_target, Install_files, Install_programs, Install_directory )
118 ## from being generated. If moving a project CMake generated Utility's will not work well in the
119 ## new path.
120 ##
121
122 SET_PROPERTY( DIRECTORY ${OSRail_BINARY_DIRECTORY}
123               PROPERTY CODEBLOCKS_PROJECT_EXCLUDE_GROUP Utility
124 )
125
126 ## \note Director property CODEBLOCKS_VIRTUAL_FOLDERS = default and/or a list
127 ## (name followed by file extenstions). The extensions must have a leading asterisk.
128 ## For example: Sources *.cpp *.cxx Headers *.h *.hpp Sources/Assembly *.s
129 ## "default" will enable virtual folders with:
130 ## "Sources;*.cpp;*.cxx;*.c;Headers*.h;*.hpp;Generated;Resources;*xrc;Scripts;*.sh;*.bat;*.cmd;*"
131 ## Any file that has a Generated property will go under Generated, any codeblocks script file will go under
132 ## Scripts along with the current CMakeList.txt file. A lone asterisk means any file without an extension.
133 ## default followed by a list will add that list to the default list above. DIRECTORY property will
134 ## override the GLOBAL property, TARGET property will override DIRECTORY and a SOURCE properaty
135 ## of CODEBLOCKS_VIRTUAL_FOLDER (Folder name only) will override all.
136 ##
137
138 SET_PROPERTY( GLOBAL
139               PROPERTY CODEBLOCKS_VIRTUAL_FOLDERS default * Scripts *.cmake
140 )
141
142
143 SUBDIRS( src/demo src/simulator src/utilities src/builds src/internationalization src/media src/tools src/test )
Note: See TracBrowser for help on using the browser.