diff options
Diffstat (limited to 'src/coreclr/hosts/unixcoreconsole/CMakeLists.txt')
-rw-r--r-- | src/coreclr/hosts/unixcoreconsole/CMakeLists.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt new file mode 100644 index 0000000000..8988e60dcf --- /dev/null +++ b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt @@ -0,0 +1,33 @@ +project(unixcoreconsole) + +include_directories(../unixcoreruncommon) + +add_compile_options(-fPIE) + +set(CORECONSOLE_SOURCES + coreconsole.cpp +) + +_add_executable(coreconsole + ${CORECONSOLE_SOURCES} +) + +# FreeBSD and NetBSD implement dlopen(3) in libc +if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD) + target_link_libraries(coreconsole + dl + ) +endif(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD) + +# Libc turns locks into no-ops if pthread was not loaded into process yet. Loading +# pthread by the process executable ensures that all locks are initialized properly. +target_link_libraries(coreconsole + unixcoreruncommon + pthread +) + +add_dependencies(coreconsole + coreclr +) + +install_clr(coreconsole)
\ No newline at end of file |