Skip to content

Commit 9495cea

Browse files
committedJan 10, 2025
Oniguruma cmake configuration windows
1 parent 7f7df93 commit 9495cea

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed
 

‎README.md

+10
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ To update oniguruma
175175
git subtree pull --prefix vendor/oniguruma/oniguruma https://github.com/kkos/oniguruma master --squash
176176
```
177177

178+
Build with minGW
179+
----------------
180+
181+
```powershell
182+
# Sample to build with MinGW on Qt (-DCMAKE_PREFIX_PATH=you cmake path)
183+
cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH="C:\Qt\6.8.0\mingw_64\lib\cmake\" .
184+
cmake --build .
185+
```
186+
187+
178188
Contributing
179189
------------
180190

‎vendor/oniguruma/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
SET(ONIG_DIR "${CMAKE_CURRENT_SOURCE_DIR}/oniguruma")
33

44
IF(NOT WIN32)
5+
message(STATUS "ONIGURUMA Unix Like - patch and configure")
56
EXECUTE_PROCESS(
67
COMMAND "cp -Rp ${CMAKE_CURRENT_SOURCE_DIR}/patch/* ${ONIG_DIR}"
78
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -14,10 +15,9 @@ IF(NOT WIN32)
1415
ENDIF(NOT WIN32)
1516

1617
IF(WIN32)
17-
EXECUTE_PROCESS(
18-
COMMAND "xcopy /s /e /Y/ I -Rp ${CMAKE_CURRENT_SOURCE_DIR}/patch/* ${ONIG_DIR} && copy ${ONIG_DIR}/src/config.h.windows.in ${ONIG_DIR}/src/config.h"
19-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
20-
)
18+
message(STATUS "ONIGURUMA Win32 - patch and copy config.h")
19+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/patch/ DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/oniguruma/)
20+
file(COPY_FILE ${CMAKE_CURRENT_SOURCE_DIR}/oniguruma/src/config.h.windows.in ${CMAKE_CURRENT_SOURCE_DIR}/oniguruma/src/config.h)
2121
ENDIF(WIN32)
2222

2323

0 commit comments

Comments
 (0)
Please sign in to comment.