#============================================================================
-
-
-
-
-
-
-
#============================================================================
# Installs creaNewProject.bat/.sh
# used to creates the file architecture for a new project
# and configures/installs the empty project structure used by creaNewProject
SET(INPUT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/NewProject)
-FILE(GLOB_RECURSE NAMES RELATIVE ${INPUT_PROJECT_DIR} *.txt *.in *.cmake )
IF(WIN32)
@ONLY IMMEDIATE
)
CREA_MKDIR(${EXECUTABLE_OUTPUT_PATH}/Debug/creaNewProject_data)
- FOREACH( NAME ${NAMES} )
- STRING(SUBSTRING ${NAME} 0 3 subStrTmp )
- MESSAGE(ERROR ${subStrTmp})
- IF( NOT ${subStrTmp} STREQUAL "../" )
- CONFIGURE_FILE(${INPUT_PROJECT_DIR}/${NAME}
- ${EXECUTABLE_OUTPUT_PATH}/Debug/creaNewProject_data/${NAME}
- COPYONLY
- )
- ENDIF( NOT ${subStrTmp} STREQUAL "../" )
- ENDFOREACH(NAME)
+ CREA_CPDIR(${INPUT_PROJECT_DIR} ${EXECUTABLE_OUTPUT_PATH}/Debug/creaNewProject_data )
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/creaNewProject.bat.in
@ONLY IMMEDIATE
)
CREA_MKDIR(${EXECUTABLE_OUTPUT_PATH}/Release/creaNewProject_data)
- FOREACH( NAME ${NAMES})
- STRING(SUBSTRING ${NAME} 0 3 subStrTmp )
- IF( NOT ${subStrTmp} STREQUAL "../" )
- CONFIGURE_FILE(${INPUT_PROJECT_DIR}/${NAME}
- ${EXECUTABLE_OUTPUT_PATH}/Release/creaNewProject_data/${NAME}
- COPYONLY )
- ENDIF( NOT ${subStrTmp} STREQUAL "../" )
- ENDFOREACH(NAME)
+ CREA_CPDIR(${INPUT_PROJECT_DIR} ${EXECUTABLE_OUTPUT_PATH}/Release/creaNewProject_data )
# install tree
@ONLY IMMEDIATE
)
CREA_MKDIR(${EXECUTABLE_OUTPUT_PATH}/creaNewProject_data)
- FOREACH( NAME ${NAMES})
- STRING(SUBSTRING ${NAME} 0 3 subStrTmp )
- IF( NOT ${subStrTmp} STREQUAL "../" )
- CONFIGURE_FILE(${INPUT_PROJECT_DIR}/${NAME}
- ${EXECUTABLE_OUTPUT_PATH}/creaNewProject_data/${NAME}
- COPYONLY )
- ENDIF( NOT ${subStrTmp} STREQUAL "../" )
- ENDFOREACH(NAME)
-
+ CREA_CPDIR(${INPUT_PROJECT_DIR} ${EXECUTABLE_OUTPUT_PATH}/creaNewProject_data )
+
+
# Install tree
INSTALL(
FILES ${EXECUTABLE_OUTPUT_PATH}/creaNewProject.sh
ENDIF(NOT IS_DIRECTORY ${DIR})
ENDMACRO(CREA_MKDIR)
#========================================================================
+
+#========================================================================
+# COPIES A DIRECTORY EXCLUDING CVS ENTRIES
+MACRO(CREA_CPDIR SOURCE DEST)
+ FILE(GLOB_RECURSE NAMES RELATIVE ${SOURCE} ${SOURCE}/*)
+ FOREACH( NAME ${NAMES})
+ STRING(SUBSTRING ${NAME} 0 3 subStrTmp )
+ IF( NOT subStrTmp STREQUAL "../" )
+ STRING(REGEX MATCH "CVS" CVSSUBS_FOUND ${NAME} )
+ IF( NOT CVSSUBS_FOUND STREQUAL "CVS" )
+ CONFIGURE_FILE(
+ ${SOURCE}/${NAME}
+ ${DEST}/${NAME}
+ COPYONLY )
+ ENDIF( NOT CVSSUBS_FOUND STREQUAL "CVS" )
+ ENDIF( NOT subStrTmp STREQUAL "../" )
+ ENDFOREACH(NAME)
+ENDMACRO(CREA_CPDIR)
+#========================================================================