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.
This commit is contained in:
David Nadlinger
2012-03-14 14:00:27 +01:00
parent 1a17b17a11
commit c0abef4831

View File

@@ -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