Skip to content
Snippets Groups Projects
Commit 1ccdeb79 authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Add PACKAGE_NAME variable to CMakeLists template, which gets the value of...

Add PACKAGE_NAME variable to CMakeLists template, which gets the value of project name substituting underscores by dashes. Variable used for packaging.
parent 7cdf18a2
No related branches found
No related tags found
1 merge request!1Install path
......@@ -9,6 +9,7 @@ endif(COMMAND cmake_policy)
# The project name and the type of project
PROJECT(project_name)
SET(PACKAGE_NAME project-name)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
......
......@@ -162,12 +162,15 @@ rm ReadMe_template.md
#Set the project name on the CMakeLists.txt script file
#NEW_NAME=$(echo $NAME | sed 's/_/-/g')
NEW_NAME=$NAME
NEW_NAME_WITH_DASHES=$(echo $NAME | sed 's/_/-/g')
if [ $TEST = 1 ]
then
sed 's/project_name/'$NEW_NAME'/g' <CMakeLists_test_template.txt >./CMakeLists.txt
else
sed 's/project_name/'$NEW_NAME'/g' <CMakeLists_template.txt >./CMakeLists.txt
sed 's/project_name/'$NEW_NAME'/g' <CMakeLists_template.txt >./temp1.txt
sed 's/project-name/'$NEW_NAME_WITH_DASHES'/g' <temp1.txt >./CMakeLists.txt
fi
rm temp1.txt
rm CMakeLists_test_template.txt
rm CMakeLists_template.txt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment