Skip to content

Fix build on Windows #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ option(BUILD_SHARED_LIBS "Build shared libraryes by default" YES)

find_package(dispatch QUIET)
find_package(Foundation QUIET)
find_package(SQLite3 REQUIRED)

add_subdirectory(Sources)
add_subdirectory(cmake/modules)
3 changes: 2 additions & 1 deletion Sources/TSCBasic/FileSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ extension FileSystem {
}
}

#if !os(Windows)
extension dirent {
/// Get the directory name.
///
Expand All @@ -911,4 +912,4 @@ extension dirent {
}
}
}

#endif
7 changes: 7 additions & 0 deletions Sources/TSCUtility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ endif()
set_target_properties(TSCUtility PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})

if(CMAKE_SYSTEM_NAME STREQUAL Windows)
install(TARGETS TSCUtility
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
endif()

set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCUtility)
3 changes: 3 additions & 0 deletions Sources/TSCclibc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ add_library(TSCclibc STATIC
target_include_directories(TSCclibc PUBLIC
include)

target_link_libraries(TSCclibc PUBLIC
SQLite::SQLite3)

if(NOT BUILD_SHARED_LIBS)
install(TARGETS TSCclibc
ARCHIVE DESTINATION lib)
Expand Down