summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2022-10-31 13:39:39 -0500
committerChad Elliott <elliottc@objectcomputing.com>2022-10-31 13:39:39 -0500
commit3e14ac84144260c21fefe113a990f03e6676d6eb (patch)
treeef7432340373c97bb26acee7e69b366b956fdae9 /templates
parent3b311531bc011b24be35aaaf61641fade3e62017 (diff)
downloadMPC-3e14ac84144260c21fefe113a990f03e6676d6eb.tar.gz
Set the target link libraries to the libraries specified without any library decorators when CMAKE_CONFIGURATION_TYPES is not set.
Diffstat (limited to 'templates')
-rw-r--r--templates/cmake.mpd4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/cmake.mpd b/templates/cmake.mpd
index 41a3b20c..f5f3cd20 100644
--- a/templates/cmake.mpd
+++ b/templates/cmake.mpd
@@ -13,7 +13,11 @@ find_package(<%package%> REQUIRED)
set(SOURCE_FILES <%source_files%>)
<%if(libs || lit_libs || pure_libs)%>
+if(CMAKE_CONFIGURATION_TYPES)
set(TARGET_LINK_LIBRARIES<%if(libs)%> <%foreach(configurations)%><%fornotfirst(" ")%>$<$<CONFIG:<%configuration%>>:<%foreach(libs)%><%fornotfirst(" ")%><%lib%>${LIBRARY_DECORATOR}<%lib_modifier%><%endfor%>><%fornotlast("\n")%><%endfor%><%endif%><%if(lit_libs)%> <%lit_libs%><%endif%><%if(pure_libs)%> <%pure_libs%><%endif%>)
+else()
+set(TARGET_LINK_LIBRARIES<%if(libs)%><%foreach(libs)%> <%lib%>${LIBRARY_DECORATOR}<%endfor%><%endif%><%if(lit_libs)%> <%lit_libs%><%endif%><%if(pure_libs)%> <%pure_libs%><%endif%>)
+endif()
<%endif%>
set(PROJECT_TARGET <%if(exename)%><%exename%><%else%><%if(sharedname)%><%sharedname%>${LIBRARY_DECORATOR}<%else%><%if(staticname)%><%staticname%>${LIBRARY_DECORATOR}<%else%><%project_name%>${LIBRARY_DECORATOR}<%endif%><%endif%><%endif%>)
<%marker(macros)%>