Skip to content
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

MSVC support; [.github/workflows/cmake.yml] Add macOS and Windows building + testing #282

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e655032
[.github/workflows/cmake.yml] Add macOS and Windows building + testing
SamuelMarks Nov 25, 2021
cf1f760
[.github/workflows/cmake.yml] Bifurcate into macOS & Linux and Window…
SamuelMarks Nov 25, 2021
a7df780
[.github/workflows/cmake.yml] Install gettext with vcpkg; use cmd on …
SamuelMarks Nov 25, 2021
34c8c7d
[CMakeLists.txt] Switch for Cygwin and MSVC support; [src/libfswatch/…
SamuelMarks Nov 25, 2021
b0ce833
[.github/workflows/cmake.yml] Rework caching name ; [src/libfswatch/c…
SamuelMarks Nov 25, 2021
891128b
[libfswatch/CMakeLists.txt] Add `source_group`s ; [.github/workflows/…
SamuelMarks Nov 25, 2021
e90581c
[libfswatch/CMakeLists.txt] Move `cygwin_paths` to else block of `if …
SamuelMarks Nov 25, 2021
facc417
[libfswatch/src/libfswatch/c++/{path_utils.hpp,{fen,inotify,kqueue,po…
SamuelMarks Nov 25, 2021
2cb8e87
[libfswatch\src\libfswatch\c++\windows] Port to MSVC; [cmake\FindPthr…
SamuelMarks Nov 29, 2021
719d31a
[.github\workflows\cmake.yml] Set `VCPKG_TARGET_TRIPLET`; [fswatch\sr…
SamuelMarks Dec 9, 2021
4cb417a
[fswatch/src/fswatch.cpp] Use raw `signal` instead of `sigaction` on …
SamuelMarks Dec 9, 2021
e2d0825
[fswatch/src/fswatch.cpp] Make `signal` calls equivalent to `sigaction`
SamuelMarks Dec 10, 2021
146d7d2
[fswatch/src/fswatch.cpp] Add missing type to `tm_time`
SamuelMarks Dec 10, 2021
5910ad4
[README.windows] Add MSVC instructions
SamuelMarks Dec 10, 2021
0c717c5
[fswatch\src\windows\getopt.c] Use `_dupenv_s` instead of `getenv` on…
SamuelMarks Dec 23, 2021
6b273e1
Merge remote-tracking branch 'origin/multi-os-ci' into multi-os-ci
SamuelMarks Dec 23, 2021
f5b9044
[**/CMakeLists.txt] Quote all vars
SamuelMarks Jan 14, 2022
9576be7
[m4/{lib}fswatch_version.m4,po/fswatch.pot,CMakeLists.txt] Bump version
SamuelMarks Jan 15, 2022
ee32afd
[{fswatch/src,libfswatch}/CMakeLists.txt] Fix iconv support within vcpkg
SamuelMarks Jan 15, 2022
9e0e2c4
[{fswatch/src,fswatch/src/windows,libfswatch}/CMakeLists.txt] Fix `in…
SamuelMarks Jan 15, 2022
5ffbbec
[error.h => fsw_error.h] Fix for vcpkg "Restricted headers paths are …
SamuelMarks Jan 15, 2022
025ec52
[fswatch/src/CMakeLists.txt] Explicitly check `VCPKG_LIBRARY_LINKAGE`…
SamuelMarks Jan 15, 2022
f788575
[**/CMakeLists.txt] Major fixup and refactor to make targets dependen…
SamuelMarks Jan 16, 2022
271eb5a
[libfswatch\src\libfswatch\c\*.h] Export symbols; comment macro closu…
SamuelMarks Jan 16, 2022
aeee7fc
Major refactor adding a `CMakeLists.txt` to every directory with a .h…
SamuelMarks Jan 17, 2022
f2c98cc
[CMakeLists.txt] `generate_export_header` to the default, i.e., ${CMA…
SamuelMarks Jan 17, 2022
c24f9de
[CMakeLists.txt] Set `/EHsc` on MSVC; [libfswatch\src\libfswatch\c++\…
SamuelMarks Jan 17, 2022
ad8228b
[*.cpp,*.hpp] Remove `#include <windows.h>` in favour of including on…
SamuelMarks Jan 18, 2022
045f44c
[libfswatch/src/libfswatch/c/CMakeLists.txt] Guard `"/EHsc"` with `MS…
SamuelMarks Jan 18, 2022
4de20b8
[CMakeLists.txt] Switch from `CMAKE_HOST_SYSTEM_PROCESSOR` to `CMAKE_…
SamuelMarks Jan 19, 2022
a40926c
[CMakeLists.txt] Fallback `TARGET_ARCH` to `CMAKE_C_COMPILER_ARCHITEC…
SamuelMarks Jan 19, 2022
d30c92f
[CMakeLists.txt] Carefully parse `TARGET_ARCH` so that its choice mat…
SamuelMarks Jan 19, 2022
ca7c03d
[CMakeLists.txt] `TARGET_ARCH` now matches what Windows header looks …
SamuelMarks Jan 19, 2022
99d52cb
[**CMakeLists.txt] Export targets for consumption by `find_package`
SamuelMarks Feb 5, 2022
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
Prev Previous commit
Next Next commit
[{fswatch/src,libfswatch}/CMakeLists.txt] Fix iconv support within vcpkg
  • Loading branch information
SamuelMarks committed Jan 15, 2022
commit ee32afdf4c1168fddb59ec095e5aacd925e9889e
13 changes: 8 additions & 5 deletions fswatch/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -22,11 +22,14 @@ source_group("${PROJECT_NAME} Source Files" FILES "${Source_Files}")
add_executable("${PROJECT_NAME}" "${Header_Files}" "${Source_Files}")

# check for gettext and libintl
if (USE_NLS)
if (Intl_LIBRARIES)
target_link_libraries("${PROJECT_NAME}" PRIVATE "${Intl_LIBRARIES}")
endif (Intl_LIBRARIES)
endif (USE_NLS)
if (USE_NLS AND Intl_LIBRARIES)
set(intl_nls_libs "${Intl_LIBRARIES}")
if (VCPKG_TOOLCHAIN)
find_package(Iconv REQUIRED)
set(intl_nls_libs "${intl_nls_libs}" "Iconv::Iconv")
endif (VCPKG_TOOLCHAIN)
target_link_libraries("${PROJECT_NAME}" PRIVATE "${intl_nls_libs}")
endif (USE_NLS AND Intl_LIBRARIES)

if (MSVC)
add_subdirectory("./windows")
21 changes: 13 additions & 8 deletions libfswatch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -17,23 +17,23 @@
set(LIBRARY_NAME "libfswatch")

# Define symbols to conditionally define FSEvents flags
if(APPLE)
if (APPLE)
if ("${CMAKE_SYSTEM_VERSION}" VERSION_GREATER_EQUAL "9.0")
set(HAVE_MACOS_GE_10_5 1)
endif()
endif ()

if ("${CMAKE_SYSTEM_VERSION}" VERSION_GREATER_EQUAL "11.0")
set(HAVE_MACOS_GE_10_7 1)
endif()
endif ()

if ("${CMAKE_SYSTEM_VERSION}" VERSION_GREATER_EQUAL "13.0")
set(HAVE_MACOS_GE_10_9 1)
endif()
endif ()

if ("${CMAKE_SYSTEM_VERSION}" VERSION_GREATER_EQUAL "14.0")
set(HAVE_MACOS_GE_10_10 1)
endif()
endif(APPLE)
endif ()
endif (APPLE)

set(LIBFSWATCH_HEADER_FILES
"src/libfswatch/c/cevent.h"
@@ -213,8 +213,13 @@ set_target_properties("${LIBRARY_NAME}" PROPERTIES PREFIX "")

# check for gettext and libintl
if (USE_NLS AND Intl_LIBRARIES)
target_link_libraries("${LIBRARY_NAME}" PRIVATE "${intl_gettext_libs}")
endif ()
set(intl_nls_libs "${Intl_LIBRARIES}")
if (VCPKG_TOOLCHAIN)
find_package(Iconv REQUIRED)
set(intl_nls_libs "${intl_nls_libs}" "Iconv::Iconv")
endif (VCPKG_TOOLCHAIN)
target_link_libraries("${LIBRARY_NAME}" PRIVATE "${intl_nls_libs}")
endif (USE_NLS AND Intl_LIBRARIES)

target_include_directories("${LIBRARY_NAME}" PUBLIC "src/libfswatch")
target_include_directories("${LIBRARY_NAME}" PUBLIC "src")