cmake_minimum_required(VERSION 3.16) project(CadMcpAec) set(SOURCES "mcp_aec.cpp" "aec_mcp_common.cpp" "aec_mcp_entity_tools.cpp" "aec_mcp_query.cpp" "StdAfx.cpp" ) add_library(CadMcpAec SHARED ${SOURCES}) target_precompile_headers(CadMcpAec PRIVATE StdAfx.h) target_set_name_and_suffix(CadMcpAec "cad_mcp_aec" ".dll") target_link_objectarx(CadMcpAec CADMCPAEC_EXPORT) # Unlike cad_mcp_plugins (read-only AcDb review, no CoreCommand link), this plugin # must new/modify the repo's custom entities (AecDbEwPipe, AecDbXWall, ...). # Their implementation lives in CoreCommand.arx (which contains the static # CoreLibrary), so link it - same as PipelineCmd does. # # Do NOT define EARTHWORM_EXPORT / AECRXBASE_EXPORT here: those macros are for # CoreLibrary/AecRxBase themselves when they export these classes; we import # them, so keep the default dllimport from the headers. target_link_libraries(CadMcpAec PRIVATE AecRxBase CoreCommand_BAL_REMOTE ) if (IS_ZWCAD) target_compile_definitions(CadMcpAec PRIVATE SUB_ARX=0) else() target_compile_definitions(CadMcpAec PRIVATE SUB_ARX=${CAD_SDK_SUBVERSION}) endif() set_debug_post_build(CadMcpAec "cad_mcp_aec" ".dll")