summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/cmake.mpd7
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/cmake.mpd b/templates/cmake.mpd
index 90a8b0a6..65a175a8 100644
--- a/templates/cmake.mpd
+++ b/templates/cmake.mpd
@@ -76,14 +76,18 @@ target_link_libraries(${PROJECT_TARGET} ${TARGET_LINK_LIBRARIES})
<%else%>
<%if(sharedname)%>
add_library(${PROJECT_TARGET} SHARED ${SOURCE_FILES})
+<%if(dynamicflags)%>
add_compile_definitions(<%dynamicflags%>)
+<%endif%>
target_link_libraries(${PROJECT_TARGET} ${TARGET_LINK_LIBRARIES})
<%else%>
<%if(staticname)%>
add_library(${PROJECT_TARGET} ${SOURCE_FILES})
+<%if(staticflags)%>
add_compile_definitions(<%staticflags%>)
<%endif%>
<%endif%>
+<%endif%>
<%if(use_lib_modifier)%>
<%foreach(configurations)%>
<%if(lib_modifier)%>
@@ -105,6 +109,9 @@ target_link_directories(${PROJECT_TARGET} PUBLIC <%env_libpaths%>)
target_precompile_headers(${PROJECT_TARGET} PRIVATE <%pch_header%>)
<%endif%>
+<%if(pch_source)%>
+add_compile_definitions(<%pch_defines%>)
+<%endif%>
<%if(macros)%>
add_compile_definitions(<%macros%>)