diff options
author | Senthil <schellap@microsoft.com> | 2016-07-01 11:41:08 +0300 |
---|---|---|
committer | Senthil <schellap@microsoft.com> | 2016-07-13 12:27:43 +0300 |
commit | 8ece5374e86032ae7f5a36304a58e1c3b99eca5a (patch) | |
tree | 3f08dd764e83c7029d13619c490ec1033936d242 /src/installer/corehost/cli/apphost/CMakeLists.txt | |
parent | 95538acdec557317b5a9a6715df63eb12c856c8b (diff) |
Split muxer into apphost
Commit migrated from https://github.com/dotnet/core-setup/commit/cf34080eb3222ea004c16bd4528e21e883713adc
Diffstat (limited to 'src/installer/corehost/cli/apphost/CMakeLists.txt')
-rw-r--r-- | src/installer/corehost/cli/apphost/CMakeLists.txt | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/installer/corehost/cli/apphost/CMakeLists.txt b/src/installer/corehost/cli/apphost/CMakeLists.txt new file mode 100644 index 00000000000..cf7a7095460 --- /dev/null +++ b/src/installer/corehost/cli/apphost/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + +cmake_minimum_required (VERSION 2.6) +project (apphost) + +if(WIN32) + add_compile_options($<$<CONFIG:RelWithDebInfo>:/MT>) + add_compile_options($<$<CONFIG:Release>:/MT>) + add_compile_options($<$<CONFIG:Debug>:/MTd>) +else() + add_compile_options(-fPIE) +endif() + +include(../setup.cmake) + +# Include directories +if(WIN32) + include_directories("${CLI_CMAKE_RESOURCE_DIR}/apphost") +endif() +include_directories(../../) +include_directories(../../common) +include_directories(../) +include_directories(../fxr) + +add_definitions(-DFEATURE_APPHOST=1) + +# CMake does not recommend using globbing since it messes with the freshness checks +set(SOURCES + ../fxr/fx_ver.cpp + ../../corehost.cpp + ../../common/trace.cpp + ../../common/utils.cpp) + + +if(WIN32) + list(APPEND SOURCES ../../common/pal.windows.cpp) +else() + list(APPEND SOURCES ../../common/pal.unix.cpp) +endif() + +set(RESOURCES) +if(WIN32) + list(APPEND RESOURCES ../native.rc) +endif() + +add_executable(apphost ${SOURCES} ${RESOURCES}) +install(TARGETS apphost DESTINATION bin) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries (apphost "dl" "pthread") +endif() + |