| 1 |
# OSRail -- a network enabled railroad operations simulator and utilities |
|---|
| 2 |
# Copyright (C) 2007,2008,2009 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 |
# Cmake script will build a project with everything - sets below |
|---|
| 21 |
# the working directory of trunk, tag or branch in the source tree. |
|---|
| 22 |
#---------------------------------------------------------------------- |
|---|
| 23 |
# Sets |
|---|
| 24 |
# SIMULATOR_WORKING_DIRECTORY |
|---|
| 25 |
# |
|---|
| 26 |
# Builds |
|---|
| 27 |
#---------------------------------------------------------------------- |
|---|
| 28 |
# |
|---|
| 29 |
## \file |
|---|
| 30 |
## \page blenderclassgeneratorcmakelists BlenderClassGenerator Utility CMakeLists.txt File. |
|---|
| 31 |
## Build the BLENDER class generator. |
|---|
| 32 |
|
|---|
| 33 |
PROJECT( BlenderClassGenerator ) |
|---|
| 34 |
# FILE( TO_NATIVE_PATH ... -- requires 2.4 |
|---|
| 35 |
CMAKE_MINIMUM_REQUIRED( VERSION 2.6.3 ) |
|---|
| 36 |
|
|---|
| 37 |
# Get Working Directory trunk tag branch |
|---|
| 38 |
IF( NOT SIMULATOR_WORKING_DIRECTORY ) |
|---|
| 39 |
|
|---|
| 40 |
STRING( REGEX REPLACE "/src/tools/blenderclassgenerator$" "" |
|---|
| 41 |
SIMULATOR_WORKING_DIRECTORY |
|---|
| 42 |
${BlenderClassGenerator_SOURCE_DIR} |
|---|
| 43 |
) |
|---|
| 44 |
|
|---|
| 45 |
FIND_PATH( SIMULATOR_WORKING_DIRECTORY |
|---|
| 46 |
Modules/prerequisite.cmake |
|---|
| 47 |
${SIMULATOR_WORKING_DIRECTORY} |
|---|
| 48 |
DOC "The working directory is trunk, or a tag or a branch name." |
|---|
| 49 |
) |
|---|
| 50 |
|
|---|
| 51 |
STRING( REGEX REPLACE "/tools/blenderclassgenerator$" "/bin" |
|---|
| 52 |
SIMULATOR_WORKING_BINARY_DIRECTORY |
|---|
| 53 |
${BlenderClassGenerator_BINARY_DIR} |
|---|
| 54 |
) |
|---|
| 55 |
|
|---|
| 56 |
INCLUDE( ${SIMULATOR_WORKING_DIRECTORY}/Modules/prerequisite.cmake ) |
|---|
| 57 |
|
|---|
| 58 |
ENDIF( NOT SIMULATOR_WORKING_DIRECTORY ) |
|---|
| 59 |
|
|---|
| 60 |
SET( HEADERS |
|---|
| 61 |
readdna.h |
|---|
| 62 |
dna_types.h |
|---|
| 63 |
) |
|---|
| 64 |
|
|---|
| 65 |
SET( SOURCES |
|---|
| 66 |
main.cpp |
|---|
| 67 |
readdna.cpp |
|---|
| 68 |
|
|---|
| 69 |
) |
|---|
| 70 |
|
|---|
| 71 |
SOURCE_GROUP( "Source Files" |
|---|
| 72 |
FILES ${SOURCES} |
|---|
| 73 |
) |
|---|
| 74 |
|
|---|
| 75 |
SOURCE_GROUP( "Header Files" |
|---|
| 76 |
FILES ${HEADERS} |
|---|
| 77 |
) |
|---|
| 78 |
|
|---|
| 79 |
SET( BLENDERCLASSGENERATOR_SOURCES |
|---|
| 80 |
${HEADERS} |
|---|
| 81 |
${SOURCES} |
|---|
| 82 |
) |
|---|
| 83 |
|
|---|
| 84 |
INCLUDE_DIRECTORIES( BlenderClassGenerator_SOURCE_DIR ) |
|---|
| 85 |
|
|---|
| 86 |
ADD_EXECUTABLE( BlenderClassGenerator |
|---|
| 87 |
${BLENDERCLASSGENERATOR_SOURCES} |
|---|
| 88 |
) |
|---|
| 89 |
|
|---|
| 90 |
PACKAGE_CONFIGURE( BlenderClassGenerator |
|---|
| 91 |
boostprogramoptions.pc |
|---|
| 92 |
osrail.pc |
|---|
| 93 |
) |
|---|
| 94 |
|
|---|
| 95 |
## \note Target property CODEBLOCKS_EXECUTION_PARAMETERS sets command line prameters for executable |
|---|
| 96 |
## under codeblocks. |
|---|
| 97 |
SET_PROPERTY( TARGET BlenderClassGenerator |
|---|
| 98 |
PROPERTY CODEBLOCKS_EXECUTION_PARAMETERS |
|---|
| 99 |
--namespace blender |
|---|
| 100 |
--single-header dna.h |
|---|
| 101 |
--generate-input-streams blenderstreams::InStream |
|---|
| 102 |
--generate-output-streams blenderstreams::OutStream |
|---|
| 103 |
--change-to-class-names |
|---|
| 104 |
) |
|---|