-SET_TARGET_PROPERTIES(${PREFER_DOTNET_AOT_PLUGIN} PROPERTIES COMPILE_FLAGS "-fPIC")
-TARGET_LINK_LIBRARIES(${PREFER_DOTNET_AOT_PLUGIN} ${${PROJECT_NAME}_LDFLAGS})
-
-
-IF(NOT DEFINED NO_TIZEN)
- INSTALL(TARGETS ${DOTNET_LAUNCHER} DESTINATION ${BINDIR})
- INSTALL(TARGETS ${SCD_LAUNCHER} DESTINATION ${BINDIR})
- INSTALL(TARGETS ${NITOOL} DESTINATION ${BINDIR})
-# INSTALL(TARGETS ${INSTALLER_PLUGIN} DESTINATION ${INSTALL_PLUGIN_DIR})
- INSTALL(TARGETS ${PREFER_DOTNET_AOT_PLUGIN} DESTINATION ${INSTALL_MDPLUGIN_DIR})
- INSTALL(FILES dotnet.loader DESTINATION ${LOADERDIR})
- INSTALL(FILES dotnet.launcher DESTINATION ${LOADERDIR})
- INSTALL(FILES dotnet.debugger DESTINATION ${LOADERDIR})
-ENDIF(NOT DEFINED NO_TIZEN)
+SET_TARGET_PROPERTIES(${PREFER_DOTNET_AOT_PLUGIN} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_LIB})
+TARGET_LINK_LIBRARIES(${PREFER_DOTNET_AOT_PLUGIN} ${${PROJECT_NAME}_LDFLAGS} ${DOTNET_LAUNCHER_UTIL} ${NI_COMMON})
+
+SET(PREFER_NUGET_CACHE_PLUGIN "prefer_nuget_cache_plugin")
+SET(${PREFER_NUGET_CACHE_PLUGIN}_SOURCE_FILES
+ installer-plugin/prefer_nuget_cache_plugin.cc
+)
+ADD_LIBRARY(${PREFER_NUGET_CACHE_PLUGIN} SHARED ${${PREFER_NUGET_CACHE_PLUGIN}_SOURCE_FILES})
+SET_TARGET_PROPERTIES(${PREFER_NUGET_CACHE_PLUGIN} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_LIB})
+TARGET_LINK_LIBRARIES(${PREFER_NUGET_CACHE_PLUGIN} ${${PROJECT_NAME}_LDFLAGS} ${DOTNET_LAUNCHER_UTIL} ${TAC_COMMON})
+
+SET(DOTNET_APPTYPE_PLUGIN "dotnet_apptype_plugin")
+SET(${DOTNET_APPTYPE_PLUGIN}_SOURCE_FILES
+ installer-plugin/dotnet_apptype_plugin.cc
+)
+ADD_LIBRARY(${DOTNET_APPTYPE_PLUGIN} SHARED ${${DOTNET_APPTYPE_PLUGIN}_SOURCE_FILES})
+SET_TARGET_PROPERTIES(${DOTNET_APPTYPE_PLUGIN} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_LIB})
+TARGET_LINK_LIBRARIES(${DOTNET_APPTYPE_PLUGIN} ${${PROJECT_NAME}_LDFLAGS} ${DOTNET_LAUNCHER_UTIL} ${MULTI_TARGET_RESOLVER} ${NI_COMMON} ${PROFILE_COMMON} ${PRIVILEGE_COMMON})
+
+# Build for test plugin library (libdotnet-plugin.so)
+IF(DEFINED BUILD_DOTNET_PLUGIN)
+ SET(DOTNET_PLUGIN "dotnet_plugin")
+ SET(${DOTNET_PLUGIN}_SOURCE_FILES
+ dotnet-plugin/dotnet_plugin.cc
+ )
+ ADD_LIBRARY(${DOTNET_PLUGIN} SHARED ${${DOTNET_PLUGIN}_SOURCE_FILES})
+ SET_TARGET_PROPERTIES(${DOTNET_PLUGIN} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_LIB})
+ TARGET_LINK_LIBRARIES(${DOTNET_PLUGIN} ${${PROJECT_NAME}_LDFLAGS})
+ENDIF(DEFINED BUILD_DOTNET_PLUGIN)
+
+CONFIGURE_FILE(dotnet-launcher.pc.in dotnet-launcher.pc @ONLY)
+
+INSTALL(TARGETS ${DOTNET_LAUNCHER_UTIL} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${DOTNET_LAUNCHER_CORE} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${DOTNET_LAUNCHER} DESTINATION ${BINDIR})
+INSTALL(TARGETS ${DOTNET_LOADER} DESTINATION ${BINDIR})
+INSTALL(TARGETS ${DOTNET_CORERUN} DESTINATION ${BINDIR})
+INSTALL(TARGETS ${DOTNET_HYDRA_LOADER} DESTINATION ${BINDIR})
+INSTALL(TARGETS ${TAC_COMMON} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${NI_COMMON} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${PROFILE_COMMON} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${PRIVILEGE_COMMON} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${MULTI_TARGET_RESOLVER} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${TPATOOL} DESTINATION ${BINDIR})
+INSTALL(TARGETS ${DOTNETTOOL} DESTINATION ${BINDIR})
+INSTALL(TARGETS ${PREFER_DOTNET_AOT_PLUGIN} DESTINATION ${INSTALL_MDPLUGIN_DIR})
+INSTALL(TARGETS ${PREFER_NUGET_CACHE_PLUGIN} DESTINATION ${INSTALL_MDPLUGIN_DIR})
+INSTALL(TARGETS ${DOTNET_APPTYPE_PLUGIN} DESTINATION ${INSTALL_PLUGIN_DIR})
+INSTALL(FILES dotnet.loader DESTINATION ${LOADERDIR})
+INSTALL(FILES dotnet.launcher DESTINATION ${LOADERDIR})
+INSTALL(FILES dotnet.debugger DESTINATION ${LOADERDIR})
+INSTALL(FILES inc/coreclr_host.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES inc/dotnet_launcher_plugin.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES inc/ni_common.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES inc/tac_common.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES inc/tac_installer.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES inc/profile_common.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES inc/privilege_common.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ../dotnet-launcher.pc DESTINATION ${LIBDIR}/pkgconfig)
+INSTALL(FILES dotnet-launcher.info DESTINATION /usr/share/parser-plugins)
+IF(DEFINED BUILD_DOTNET_PLUGIN)
+ INSTALL(TARGETS ${DOTNET_PLUGIN} DESTINATION ${NATIVE_LIB_DIR})
+ENDIF(DEFINED BUILD_DOTNET_PLUGIN)
+