CMakeLists.txt 969 字节
Newer Older
1 2 3 4
# 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)
5
project(apphost)
6
set(DOTNET_HOST_EXE_NAME "apphost")
7 8 9 10 11 12 13 14 15 16 17

# Add RPATH to the apphost binary that allows using local copies of shared libraries
# dotnet core depends on for special scenarios when system wide installation of such 
# dependencies is not possible for some reason.
# This cannot be enabled for MacOS (Darwin) since its RPATH works in a different way,
# doesn't apply to libraries loaded via dlopen and most importantly, it is not transitive.
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
    set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
    set(CMAKE_INSTALL_RPATH "\$ORIGIN/netcoredeps")
endif()

18
set(SKIP_VERSIONING 1)
19 20

set(SOURCES
21
    ../fxr/fx_ver.cpp
22 23
)

24
include(../exe.cmake)
25

26 27
add_definitions(-DFEATURE_APPHOST=1)

28
install_library_and_symbols (apphost)