From 9c4de45ba8c0215deb10066be3755a28a50237a5 Mon Sep 17 00:00:00 2001 From: Chad Elliott Date: Wed, 19 Oct 2022 08:59:04 -0500 Subject: Check for dynamicflags and staticflags before using them. Added pch_defines. --- templates/cmake.mpd | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'templates') 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)%> @@ -104,6 +108,9 @@ target_link_directories(${PROJECT_TARGET} PUBLIC <%env_libpaths%>) <%if(pch_header)%> target_precompile_headers(${PROJECT_TARGET} PRIVATE <%pch_header%>) +<%endif%> +<%if(pch_source)%> +add_compile_definitions(<%pch_defines%>) <%endif%> <%if(macros)%> add_compile_definitions(<%macros%>) -- cgit v1.2.1