+add_subdirectory(hostmisc)
+add_subdirectory(hostcommon)
add_subdirectory(apphost)
add_subdirectory(dotnet)
add_subdirectory(fxr)
set(SKIP_VERSIONING 1)
set(SOURCES
- ../fxr/fx_ver.cpp
./bundle/file_entry.cpp
./bundle/manifest.cpp
./bundle/header.cpp
)
set(HEADERS
- ../fxr/fx_ver.h
./bundle/file_type.h
./bundle/file_entry.h
./bundle/manifest.h
../fxr_resolver.cpp
clsidmap.cpp
../redirected_error_writer.cpp
- ../fxr/fx_ver.cpp
- ../json_parser.cpp
)
set(HEADERS
comhost.h
- ../fxr/fx_ver.h
- ../json_parser.h
)
if(CLR_CMAKE_TARGET_WIN32)
install(TARGETS comhost DESTINATION corehost)
install_symbols(comhost corehost)
+target_link_libraries(comhost libhostcommon)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
include_directories(${CMAKE_CURRENT_LIST_DIR}/)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../)
-include_directories(${CMAKE_CURRENT_LIST_DIR}/../common)
-
-list(APPEND SOURCES
- ${CMAKE_CURRENT_LIST_DIR}/../common/trace.cpp
- ${CMAKE_CURRENT_LIST_DIR}/../common/utils.cpp)
-
-list(APPEND HEADERS
- ${CMAKE_CURRENT_LIST_DIR}/../common/trace.h
- ${CMAKE_CURRENT_LIST_DIR}/../common/utils.h
- ${CMAKE_CURRENT_LIST_DIR}/../common/pal.h
- ${CMAKE_CURRENT_LIST_DIR}/../error_codes.h)
-
-if(CLR_CMAKE_TARGET_WIN32)
- list(APPEND SOURCES
- ${CMAKE_CURRENT_LIST_DIR}/../common/pal.windows.cpp
- ${CMAKE_CURRENT_LIST_DIR}/../common/longfile.windows.cpp)
- list(APPEND HEADERS
- ${CMAKE_CURRENT_LIST_DIR}/../common/longfile.h)
-else()
- list(APPEND SOURCES
- ${CMAKE_CURRENT_LIST_DIR}/../common/pal.unix.cpp
- ${VERSION_FILE_PATH})
-endif()
+include_directories(${CMAKE_CURRENT_LIST_DIR}/hostmisc)
set(RESOURCES)
if(CLR_CMAKE_TARGET_WIN32 AND NOT SKIP_VERSIONING)
endif()
endif()
- # Specify the import library to link against for Arm32 build since the default set is minimal
- if (CLR_CMAKE_TARGET_ARCH_ARM)
- if (CLR_CMAKE_TARGET_WIN32)
- target_link_libraries(${DOTNET_PROJECT_NAME} shell32.lib)
- else()
- target_link_libraries(${DOTNET_PROJECT_NAME} atomic.a)
+ if (NOT ${TargetType} STREQUAL "lib-static")
+ # Specify the import library to link against for Arm32 build since the default set is minimal
+ if (CLR_CMAKE_TARGET_ARCH_ARM)
+ if (CLR_CMAKE_TARGET_WIN32)
+ target_link_libraries(${DOTNET_PROJECT_NAME} shell32.lib)
+ else()
+ target_link_libraries(${DOTNET_PROJECT_NAME} atomic.a)
+ endif()
endif()
endif()
endfunction()
project(dotnet)
set(DOTNET_PROJECT_NAME "dotnet")
-set(SOURCES
- ../fxr/fx_ver.cpp
-)
-
-set(HEADERS
- ../fxr/fx_ver.h
-)
-
if(CLR_CMAKE_TARGET_WIN32)
list(APPEND SOURCES
dotnet.manifest)
list(APPEND SOURCES
${CMAKE_CURRENT_LIST_DIR}/fxr_resolver.cpp
${CMAKE_CURRENT_LIST_DIR}/../corehost.cpp
- ${CMAKE_CURRENT_LIST_DIR}/../common/trace.cpp
- ${CMAKE_CURRENT_LIST_DIR}/../common/utils.cpp)
+)
add_executable(${DOTNET_PROJECT_NAME} ${SOURCES} ${RESOURCES})
+target_link_libraries(${DOTNET_PROJECT_NAME} libhostmisc)
if(NOT CLR_CMAKE_TARGET_WIN32)
disable_pax_mprotect(${DOTNET_PROJECT_NAME})
# CMake does not recommend using globbing since it messes with the freshness checks
set(SOURCES
- ../deps_format.cpp
- ../deps_entry.cpp
- ../host_startup_info.cpp
- ../roll_forward_option.cpp
- ../runtime_config.cpp
- ../fx_definition.cpp
- ../fx_reference.cpp
- ../version.cpp
- ../version_compatibility_range.cpp
- ../json_parser.cpp
./command_line.cpp
./corehost_init.cpp
./hostfxr.cpp
- ./fx_ver.cpp
./fx_muxer.cpp
./fx_resolver.cpp
./fx_resolver.messages.cpp
set(HEADERS
../corehost_context_contract.h
- ../deps_format.h
- ../deps_entry.h
- ../host_startup_info.h
../hostpolicy.h
- ../runtime_config.h
../fx_definition.h
../fx_reference.h
- ../roll_forward_option.h
../roll_fwd_on_no_candidate_fx_option.h
- ../version.h
- ../version_compatibility_range.h
- ../json_parser.h
./command_line.h
./corehost_init.h
- ./fx_ver.h
./fx_muxer.h
./fx_resolver.h
./framework_info.h
install(TARGETS hostfxr DESTINATION corehost)
install_symbols(hostfxr corehost)
+target_link_libraries(hostfxr libhostcommon)
--- /dev/null
+# Licensed to the .NET Foundation under one or more agreements.
+# The .NET Foundation licenses this file to you under the MIT license.
+# See the LICENSE file in the project root for more information.
+
+project(hostcommon)
+
+set(DOTNET_PROJECT_NAME "hostcommon")
+
+# Include directories
+include_directories(../fxr)
+include_directories(../json)
+
+# CMake does not recommend using globbing since it messes with the freshness checks
+set(SOURCES
+ ../json_parser.cpp
+ ../deps_format.cpp
+ ../deps_entry.cpp
+ ../host_startup_info.cpp
+ ../roll_forward_option.cpp
+ ../fx_definition.cpp
+ ../fx_reference.cpp
+ ../fxr/fx_ver.cpp
+ ../version.cpp
+ ../version_compatibility_range.cpp
+ ../runtime_config.cpp
+)
+
+set(HEADERS
+ ../json_parser.h
+ ../deps_format.h
+ ../deps_entry.h
+ ../host_startup_info.h
+ ../roll_forward_option.h
+ ../fx_definition.h
+ ../fx_reference.h
+ ../fxr/fx_ver.h
+ ../version.h
+ ../version_compatibility_range.h
+ ../runtime_config.h
+)
+
+set(SKIP_VERSIONING 1)
+include(../lib_static.cmake)
+
--- /dev/null
+# Licensed to the .NET Foundation under one or more agreements.
+# The .NET Foundation licenses this file to you under the MIT license.
+# See the LICENSE file in the project root for more information.
+
+project(hostmisc)
+
+set(DOTNET_PROJECT_NAME "hostmisc")
+
+# CMake does not recommend using globbing since it messes with the freshness checks
+set(SOURCES
+ trace.cpp
+ utils.cpp
+ ../fxr/fx_ver.cpp
+)
+
+set(HEADERS
+ trace.h
+ utils.h
+ pal.h
+ ../../error_codes.h
+ ../fxr/fx_ver.h
+)
+
+if(CLR_CMAKE_TARGET_WIN32)
+ list(APPEND SOURCES
+ pal.windows.cpp
+ longfile.windows.cpp)
+ list(APPEND HEADERS
+ longfile.h)
+else()
+ list(APPEND SOURCES
+ pal.unix.cpp
+ ${VERSION_FILE_PATH})
+endif()
+
+set(SKIP_VERSIONING 1)
+include(../lib_static.cmake)
+
./breadcrumbs.cpp
./coreclr.cpp
./deps_resolver.cpp
- ./hostpolicy.cpp
./hostpolicy_context.cpp
+ ./hostpolicy.cpp
./hostpolicy_init.cpp
- ../roll_forward_option.cpp
- ../runtime_config.cpp
- ../fxr/fx_ver.cpp
- ../host_startup_info.cpp
- ../deps_format.cpp
- ../deps_entry.cpp
- ../fx_definition.cpp
- ../fx_reference.cpp
- ../version.cpp
- ../version_compatibility_range.cpp
- ../json_parser.cpp
)
set(HEADERS
./args.h
./breadcrumbs.h
./coreclr.h
+ ../corehost_context_contract.h
./deps_resolver.h
./hostpolicy_context.h
- ./hostpolicy_init.h
- ../corehost_context_contract.h
../hostpolicy.h
- ../runtime_config.h
- ../fxr/fx_ver.h
- ../host_startup_info.h
- ../deps_format.h
- ../deps_entry.h
- ../fx_definition.h
- ../fx_reference.h
- ../version.h
- ../version_compatibility_range.h
- ../json_parser.h
+ ./hostpolicy_init.h
)
include(../lib.cmake)
install(TARGETS hostpolicy DESTINATION corehost)
install_symbols(hostpolicy corehost)
+target_link_libraries(hostpolicy libhostcommon)
ijwthunk.cpp
ijwhost.cpp
../fxr_resolver.cpp
- ../../common/trace.cpp
- ../../common/utils.cpp
- ../fxr/fx_ver.cpp
pedecoder.cpp
bootstrap_thunk_chunk.cpp
${ARCH_SPECIFIC_FOLDER_NAME}/bootstrap_thunk.cpp
add_definitions(-DEXPORT_SHARED_API=1)
add_library(${DOTNET_PROJECT_NAME} SHARED ${SOURCES} ${RESOURCES})
+target_link_libraries(${DOTNET_PROJECT_NAME} libhostmisc)
set_target_properties(${DOTNET_PROJECT_NAME} PROPERTIES MACOSX_RPATH TRUE)
set_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES MACOSX_RPATH TRUE)
set_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES PREFIX "")
-set_common_libs("lib")
+set_common_libs("lib-static")
set(SOURCES
nethost.cpp
../fxr_resolver.cpp
- ../fxr/fx_ver.cpp
)
if(CLR_CMAKE_TARGET_WIN32)
set(EXE_NAME "test_fx_ver")
include_directories(../fxr)
-include_directories(../../common)
+include_directories(../hostmisc)
set(SOURCES
test_fx_ver.cpp
- ../fxr/fx_ver.cpp
- ../../common/trace.cpp
- ../../common/utils.cpp)
-
-if(CLR_CMAKE_TARGET_WIN32)
- list(APPEND SOURCES
- ../../common/pal.windows.cpp
- ../../common/longfile.windows.cpp)
-else()
- list(APPEND SOURCES
- ../../common/pal.unix.cpp)
-endif()
+)
if(CLR_CMAKE_HOST_WIN32)
add_compile_options($<$<CONFIG:RelWithDebInfo>:/MT>)
endif()
add_executable(${EXE_NAME} ${SOURCES})
+target_link_libraries(${EXE_NAME} libhostmisc libhostcommon)
install(TARGETS ${EXE_NAME} DESTINATION corehost_test)
winrthost.cpp
../redirected_error_writer.cpp
../fxr_resolver.cpp
- ../../common/trace.cpp
- ../../common/utils.cpp
- ../fxr/fx_ver.cpp
)
if(CLR_CMAKE_TARGET_WIN32)
target_link_libraries(winrthost Advapi32.lib Ole32.lib OleAut32.lib)
endif()
-target_link_libraries(winrthost RuntimeObject.lib)
+target_link_libraries(winrthost RuntimeObject.lib libhostmisc libhostcommon)
install(TARGETS winrthost DESTINATION corehost)
install_symbols(winrthost corehost)