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

Add example TARGET_LINK_LIBRARIES and ADD_DEPENDENCIES lines in src/CMakeLists.txt

parent f4fadf5a
No related branches found
No related tags found
1 merge request!1Install path
......@@ -201,10 +201,12 @@ then
echo "# create the executable file" >> CMakeLists.tmp
echo "ADD_EXECUTABLE(${PROJECT_NAME_VAR} "'${'"sources"'}'")" >> CMakeLists.tmp
echo "# link necessary libraries" >> CMakeLists.tmp
echo "#TARGET_LINK_LIBRARIES(${PROJECT_NAME_VAR} \${my_example_library_LIBRARIES})">>CMakeLists.tmp
for x in $arr
do
echo "TARGET_LINK_LIBRARIES(${PROJECT_NAME_VAR} "'${'"${x}_LIBRARY"'}'")" >> CMakeLists.tmp
done
echo "#ADD_DEPENDENCIES(${PROJECT_NAME_VAR} my_example_library_target)">>CMakeLists.tmp
mv CMakeLists.tmp ./src/CMakeLists.txt
mv application_src_template.cpp ./src/$NAME.cpp
else
......@@ -226,10 +228,12 @@ else
echo "# create the shared library" >> CMakeLists.tmp
echo "ADD_LIBRARY(${PROJECT_NAME_VAR} SHARED "'${'"sources"'}'")" >> CMakeLists.tmp
echo "# link necessary libraries" >> CMakeLists.tmp
echo "#TARGET_LINK_LIBRARIES(${PROJECT_NAME_VAR} \${my_example_library_LIBRARIES})">>CMakeLists.tmp
for x in $arr
do
echo "TARGET_LINK_LIBRARIES(${PROJECT_NAME_VAR} "'${'"${x}_LIBRARY"'}'")" >> CMakeLists.tmp
done
echo "#ADD_DEPENDENCIES(${PROJECT_NAME_VAR} my_example_library_target)">>CMakeLists.tmp
echo "INSTALL(TARGETS $PROJECT_NAME_VAR" >> CMakeLists.tmp
echo " RUNTIME DESTINATION bin" >> CMakeLists.tmp
echo " LIBRARY DESTINATION lib/iri/${PROJECT_NAME_VAR}" >> CMakeLists.tmp
......
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