From c0abef4831426f1060f47df7c14f60fc8536b402 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Wed, 14 Mar 2012 14:00:27 +0100 Subject: [PATCH] Fix druntime/Phobos module installation on OS X. Note: Currently, we are not following a consequent strategy regarding which files to install and which to omit. In the future, we should either always install all of the modules (because they should have version() guards anyway), or omit all the files with paths containing {osx,windows,linux,freebsd} on the other OSes. --- runtime/CMakeLists.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 45e665a8..c0cc3aa6 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -74,11 +74,12 @@ file(GLOB DCRT_C ${RUNTIME_DC_DIR}/*.c) list(REMOVE_ITEM DCRT_C ${RUNTIME_DC_DIR}/deh.c ${RUNTIME_DC_DIR}/dylib_fixes.c) if(UNIX) file(GLOB_RECURSE CORE_D_SYS ${RUNTIME_DIR}/src/core/sys/posix/*.d) + if(APPLE) + file(GLOB_RECURSE CORE_D_SYS ${RUNTIME_DIR}/src/core/sys/osx/*.d) + endif() elseif(WIN32) file(GLOB_RECURSE CORE_D_SYS ${RUNTIME_DIR}/src/core/sys/windows/*.d) -elseif(APPLE) - file(GLOB_RECURSE CORE_D_SYS ${RUNTIME_DIR}/src/core/sys/osx/*.d) -endif(UNIX) +endif() list(APPEND CORE_D ${CORE_D_SYNC} ${CORE_D_SYS} ${CORE_D_STDC} ) list(APPEND GENERATE_DI ${CORE_D}) list(APPEND CORE_D ${LDC_D} ${RUNTIME_DIR}/src/object_.d) @@ -89,13 +90,15 @@ if(PHOBOS2_DIR) file(GLOB_RECURSE PHOBOS2_D_INTERNAL ${PHOBOS2_DIR}/std/internal/*.d) file(GLOB PHOBOS2_D_C ${PHOBOS2_DIR}/std/c/*.d) file(GLOB PHOBOS2_ETC ${PHOBOS2_DIR}/etc/c/*.d) - if(UNIX) + if(APPLE) + file(GLOB PHOBOS2_D_C_SYS ${PHOBOS2_DIR}/std/c/osx/*.d) + elseif(UNIX) + # Install Linux headers on all non-Apple *nixes - not correct, but + # shouldn't cause any harm either. file(GLOB PHOBOS2_D_C_SYS ${PHOBOS2_DIR}/std/c/linux/*.d) elseif(WIN32) file(GLOB PHOBOS2_D_C_SYS ${PHOBOS2_DIR}/std/c/windows/*.d) - elseif(APPLE) - file(GLOB PHOBOS2_D_C_SYS ${PHOBOS2_DIR}/std/c/osx/*.d) - endif(UNIX) + endif() file(GLOB ZLIB_C ${PHOBOS2_DIR}/etc/c/zlib/*.c) list(REMOVE_ITEM ZLIB_C ${PHOBOS2_DIR}/etc/c/zlib/minigzip.c