CMakeLists.txt 1.1 KB
Newer Older
1 2 3
# 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.
4 5

cmake_minimum_required (VERSION 2.6)
6
project(apphost)
7
set(DOTNET_PROJECT_NAME "apphost")
8 9 10 11 12 13 14 15 16 17 18

# 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()

19
set(SKIP_VERSIONING 1)
20 21

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

25 26 27 28
set(HEADERS
    ../fxr/fx_ver.h
)

29
include(../exe.cmake)
30

31 32
add_definitions(-DFEATURE_APPHOST=1)

33 34 35 36 37 38
# Disable manifest generation into the file .exe on Windows
if(WIN32)
    set_property(TARGET ${PROJECT_NAME} PROPERTY 
            LINK_FLAGS "/MANIFEST:NO" 
        ) 
endif()