diff options
author | Chad Elliott <elliottc@objectcomputing.com> | 2022-10-19 08:59:04 -0500 |
---|---|---|
committer | Chad Elliott <elliottc@objectcomputing.com> | 2022-10-19 08:59:04 -0500 |
commit | 9c4de45ba8c0215deb10066be3755a28a50237a5 (patch) | |
tree | 3ab43007cfdb6d08a47af5e84bee1a2012acd2fe /templates | |
parent | 52bfb94882530b4313d4a9341148bd1f7c1b6531 (diff) | |
download | MPC-9c4de45ba8c0215deb10066be3755a28a50237a5.tar.gz |
Check for dynamicflags and staticflags before using them. Added pch_defines.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/cmake.mpd | 7 |
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%>) |