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