diff --git a/cmfe/lib/FrontendWrapper/package.cmake b/cmfe/lib/FrontendWrapper/package.cmake index 04dcb007e9c8..537537a42fa5 100644 --- a/cmfe/lib/FrontendWrapper/package.cmake +++ b/cmfe/lib/FrontendWrapper/package.cmake @@ -102,6 +102,7 @@ set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_RPM_COMPONENT_INSTALL ON) set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) -set(CPACK_COMPONENTS_ALL clangFEWrapper cmoc) +set(CMC_TOOL_NAME cmc) +set(CPACK_COMPONENTS_ALL clangFEWrapper ${CMC_TOOL_NAME}) set(CPACK_GENERATOR "RPM" "DEB" "TXZ") include(CPack) \ No newline at end of file diff --git a/cmfe/tools/cmoc/CMakeLists.txt b/cmfe/tools/cmoc/CMakeLists.txt index 4431829c699e..8d6fd01c0286 100644 --- a/cmfe/tools/cmoc/CMakeLists.txt +++ b/cmfe/tools/cmoc/CMakeLists.txt @@ -1,8 +1,10 @@ +set(CMC_TOOL_NAME cmc) + set(LLVM_LINK_COMPONENTS Support ) -add_clang_tool(cmoc +add_clang_tool(${CMC_TOOL_NAME} cmoc.cpp Backend.cpp ) @@ -14,12 +16,12 @@ if(OCLOC_API_HEADER) DIRECTORY ) - target_include_directories(cmoc + target_include_directories(${CMC_TOOL_NAME} PRIVATE ${OCLOC_API_INCLUDE_DIR} ) - target_compile_definitions(cmoc + target_compile_definitions(${CMC_TOOL_NAME} PRIVATE "USE_OCLOC_API_HEADER" ) @@ -35,12 +37,12 @@ else() set(LIBOCLOC "libocloc.so") endif() -target_compile_definitions(cmoc +target_compile_definitions(${CMC_TOOL_NAME} PRIVATE "LIBOCLOC_NAME=\"${LIBOCLOC}\"" ) -target_link_libraries(cmoc +target_link_libraries(${CMC_TOOL_NAME} PRIVATE CMFrontendWrapper )