Skip to content

Commit 7eff1f2

Browse files
authored
Update CMakeLists.txt
Update CMakeLists.txt to allow cross compiling on Linux for Windows. Pass -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -DCYGWIN=1" to cmake so right PRETTY_FUNC is used in markdown.cpp when -DWIN32 is set somewhere else. Pass -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS) -Wl,--whole-archive -liconv -Wl,--no-whole-archive" (and make sure win-iconv is in library search path. https://github.com/win-iconv/win-iconv)
1 parent 979ea24 commit 7eff1f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ endif()
6969

7070
if (WIN32)
7171
if ((NOT CMAKE_GENERATOR MATCHES "MinGW Makefiles") AND
72-
(NOT CMAKE_GENERATOR MATCHES "MSYS Makefiles"))
72+
(NOT CMAKE_GENERATOR MATCHES "MSYS Makefiles") AND
73+
(NOT CMAKE_GENERATOR MATCHES "Unix Makefiles"))
7374
if (NOT ICONV_DIR)
7475
set(ICONV_DIR "${PROJECT_SOURCE_DIR}/winbuild")
7576
endif()

0 commit comments

Comments
 (0)