diff --git a/CMakeLists_template.txt b/CMakeLists_template.txt index 4e84928b7abb417ad2df67ccf7bd5bf7ad02a1eb..531bfed5ef83b02dc0fa597b472d987c3673871b 100755 --- a/CMakeLists_template.txt +++ b/CMakeLists_template.txt @@ -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) diff --git a/new_project.sh b/new_project.sh index dfba67b45663b0650e56aeaaf4b79513d718e800..23dedf502c2864dd5b0addba25afabb345be5f0f 100755 --- a/new_project.sh +++ b/new_project.sh @@ -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