@@ -24,7 +24,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
2424include (cmake/StandardSettings.cmake)
2525include (cmake/StaticAnalyzers.cmake)
2626include (cmake/Utils.cmake)
27- message (STATUS "Started CMake for ${PROJECT_NAME} v${PROJECT_VERSION} ...\n " )
27+ message (STATUS "Started CMake for ${PROJECT_NAME} v${PROJECT_VERSION} ..." )
2828
2929if (NOT CMAKE_BUILD_TYPE )
3030 if (IS_MAIN_PROJECT)
@@ -41,7 +41,7 @@ endif()
4141#
4242
4343if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR )
44- message (FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.\n " )
44+ message (FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there." )
4545endif ()
4646
4747#
@@ -51,7 +51,7 @@ endif()
5151include (TestBigEndian)
5252test_big_endian(IS_BIG_ENDIAN)
5353if (IS_BIG_ENDIAN)
54- message (FATAL_ERROR "Big-endian platforms aren't supported because DBN parsing assumes the data is little-endian and in native byte order.\n " )
54+ message (FATAL_ERROR "Big-endian platforms aren't supported because DBN parsing assumes the data is little-endian and in native byte order." )
5555endif ()
5656
5757#
@@ -94,7 +94,7 @@ set_target_properties(
9494 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /lib/${CMAKE_BUILD_TYPE} "
9595)
9696
97- message (STATUS "Added all header and implementation files.\n " )
97+ message (STATUS "Added all header and implementation files." )
9898
9999#
100100# Set the project standard and warnings
@@ -110,7 +110,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_BUILD_TYPE STREQUAL "Debug")
110110 target_compile_options (${PROJECT_NAME} PRIVATE -fstandalone-debug)
111111endif ()
112112
113- verbose_message("Applied compiler warnings.\n " )
113+ verbose_message("Applied compiler warnings." )
114114
115115#
116116# Model project dependencies
@@ -169,6 +169,18 @@ endif()
169169find_package (Zstd REQUIRED)
170170find_package (Threads REQUIRED)
171171
172+ #
173+ # Platform-specific dependencies
174+ #
175+ if (WIN32 )
176+ find_path (
177+ DIRENT_INCLUDE_DIR "dirent.h"
178+ PATHS "${_VCPKG_INSTALLED_DIR} /${VCPKG_TARGET_TRIPLET} /include"
179+ REQUIRED
180+ )
181+ target_include_directories (${PROJECT_NAME} PRIVATE ${DIRENT_INCLUDE_DIR} )
182+ endif ()
183+
172184target_link_libraries (
173185 ${PROJECT_NAME}
174186 PUBLIC
@@ -210,7 +222,7 @@ message(STATUS "Finished setting up include directories.")
210222
211223add_library (${PROJECT_NAME} ::${PROJECT_NAME} ALIAS ${PROJECT_NAME} )
212224
213- verbose_message("Project is now aliased as ${PROJECT_NAME} ::${PROJECT_NAME} .\n " )
225+ verbose_message("Project is now aliased as ${PROJECT_NAME} ::${PROJECT_NAME} ." )
214226
215227#
216228# Format the project using the `clang-format` target (i.e: cmake --build build --target clang-format)
@@ -319,7 +331,14 @@ if(${PROJECT_NAME_UPPERCASE}_GENERATE_EXPORT_HEADER)
319331 message (STATUS "Generated the export header `${PROJECT_NAME} _export.h` and installed it." )
320332endif ()
321333
322- message (STATUS "Finished building requirements for installing the package.\n " )
334+ message (STATUS "Finished building requirements for installing the package." )
335+
336+ #
337+ # Platform-specific
338+ #
339+ if (WIN32 )
340+ add_compile_definitions (NOMINMAX)
341+ endif ()
323342
324343#
325344# Unit testing setup
0 commit comments