<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
ITNOA
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [ ] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description <!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4113
-- Commit Summary --
* Make cmake happy
-- File Changes --
M CMakeLists.txt (13) A CMakePresets.json (13) M cmake/compiler-specific.cmake (1) M cmake/os-specific.cmake (3) A cmake/os-specific/windows.cmake (5) M src/CMakeLists.txt (107) M src/core/CMakeLists.txt (4) M utils/kamcmd/CMakeLists.txt (40) A vcpkg-configuration.json (14) A vcpkg.json (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4113.patch https://github.com/kamailio/kamailio/pull/4113.diff
@soroshsabz pushed 1 commit.
b363991b641ea3979fb6e3d5b8da2fdbab431f4c Exclude some subdirectory
@soroshsabz pushed 1 commit.
b2504e6a9283c57c9c3529a5fa264b6f649bee1e Resolve KSR problem
blocks by #4114
In this step cmake make happy and green to generate build files in Windows, so I think this PR can merge in this step
Hello, before going further this way you should start a discussion e.g. on the developer list or during one of the next online developer meetings. There will be many changes necessary to really support Windows, and right now I am not 100% sure if this is really a feasible thing to do that will work in the end. In the old Makefile structure there was some support for Cygwin, but I have never really seen this working or used from somebody.
I don't see the value of porting kamailio to windows. But if you want to do it... no one will stop you from doing it, in your fork. Pushing changes just because, makes no sense to me. This will just make things harder to maintain.
@linuxmaniac thanks for your reply, many company use Windows environment for IT infrastructure, so if I can port kamailio to Windows, and merge into main repo, windows has come to second citizenship class of kamailio, and many companies can use better kamailio with default their IT environment, and reducing IT staff cost.
I think we have only two big changes, one for networking and another one for threading. in threading changes, I plan to use just more standard approach, so I think not only does it not reduce maintainability, but it also increases it. You are absolutely right about the changes needed for the network, But I think we can limit these changes as much as possible and reduce their scope by abstracting them.
isn't `docker` or `wsl` a valid alternative ? I think we don't need these `windows` specific changes.
@lazedo many Windows first environment does not have WSL on Windows Server and does not use Linux container and they use [Windows Container](https://learn.microsoft.com/en-us/virtualization/windowscontainers/about/) instead.
@soroshsabz commented on this pull request.
@@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 3.10)
# Use cmake -DCMAKE_SYSTEM_NAME .. for cross-compiling (inside build directory)
+# cmake_policy must be before project for working with toolchain together +if(WIN32) + cmake_policy(SET CMP0074 NEW) + cmake_policy(SET CMP0156 OLD)
Add comments
https://cmake.org/cmake/help/latest/policy/CMP0156.html
@@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 3.10)
# Use cmake -DCMAKE_SYSTEM_NAME .. for cross-compiling (inside build directory)
+# cmake_policy must be before project for working with toolchain together +if(WIN32) + cmake_policy(SET CMP0074 NEW) + cmake_policy(SET CMP0156 OLD) + cmake_policy(SET CMP0082 OLD)
Add comments https://cmake.org/cmake/help/latest/policy/CMP0082.html
@@ -0,0 +1,7 @@
+# Windows specific flags +message(STATUS "Configuring for Windows") + +set(FLEX_ROOT "C:/GnuWin32") +set(BISON_ROOT "C:/GnuWin32") +set(ENV PATH "C:/GnuWin32/bin;$ENV{PATH}" CACHE INTERNAL "") +set(ENV PATH "C:/GnuWin32/bin;$ENV{PATH}")
Check persist env changing
https://stackoverflow.com/a/41139360/1539100
github-actions[bot] left a comment (kamailio/kamailio#4113)
This PR is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.
Closed #4113.