This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository eshell.

View the commit online.

commit c8da8cb0d71fa67df7a0eafc612b4e0e19b6fca6
Author: Swagtoy <m...@ow.swag.toys>
AuthorDate: Mon Nov 18 02:36:40 2024 -0500

    Switch from CMake to Meson
    
    This was decided far beyond the logic that "everything for EFL uses
    it." You see, initially I had some strange thought process that I
    should be friendly to most IDE's, however, I decided I hate people who
    use IDEs for this decision, and instead to just think: "well its a
    shell! Not a game, or some crazy large project with possible new
    contributors who want some ease of setup!" Of course, there's no
    serious bias coming in here, it's just that I think its not worth
    sticking with CMake for a project like this because I actually don't
    like CMake (well, there's some bias for ya, actually). It's a messy
    language, and dependencies aren't precisely fun to deal with, so
    overall it's just not desirable for me--and most specifically--this
    project.
    
    Well, what is particularly neat is that Meson had some settings for
    generators beyond Ninja. As of typing this, I have not messed with
    these, however it gave me hope to say that I could just move to Meson
    without caring about CMake at all. It's nearly impossible to justify
    CMake now, albeit I suppose i'd loose some nicher IDEs that nobody
    truly cares about; any fancier IDE's I am sure would have
    native/plugin Meson support. Otherwise... just suck it up and use the
    shell like I do :^)
    
    So actually, it wraps around to my first point; I guess my other bias
    was that most EFL projects do use Meson, so I can also snag some of
    their code if I needed too. It's just hard to justify CMake for IDE's
    though, considering i've been building with the terminal myself
    anyway. IDE friends can use the terminal too, or get a plugin if they
    do want that convience/familiarity, or generate their IDE's one with
    Meson... :D That seems to be the most sustainable option.
---
 CMakeLists.txt          |  8 --------
 README.md               |  4 ++--
 escript/CMakeLists.txt  | 19 -------------------
 escript/meson.build     | 16 ++++++++++++++++
 escript/src/meson.build |  4 ++++
 eshell/CMakeLists.txt   | 18 ------------------
 eshell/meson.build      | 11 +++++++++++
 eshell/src/meson.build  |  4 ++++
 meson.build             |  6 ++++++
 9 files changed, 43 insertions(+), 47 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 3a79b26..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-cmake_minimum_required(VERSION 3.15)
-set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
-
-project(EscriptRoot)
-
-add_subdirectory(escript)
-add_subdirectory(eshell)
-
diff --git a/README.md b/README.md
index b9eecd1..673ddcf 100644
--- a/README.md
+++ b/README.md
@@ -34,8 +34,8 @@ And it's more than just a shell language, you can (securely!) bring it to the we
 
 # Building
 
-Put CMAKE instructions here.
+Meson
 
 # License
 
-See `LICENSE`. Using the BSD 2-Clause License.
\ No newline at end of file
+See `LICENSE`. Using the BSD 2-Clause License.
diff --git a/escript/CMakeLists.txt b/escript/CMakeLists.txt
deleted file mode 100644
index 73e290e..0000000
--- a/escript/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-project(
-	Escript
-	VERSION 0.0
-	DESCRIPTION "Escript library"
-	LANGUAGES C)
-
-# TODO not just PkgConfig
-find_package(PkgConfig)
-pkg_check_modules(EFL REQUIRED efl ecore)
-
-add_library(Escript
-	src/escript.c src/lexer.c)
-
-set_target_properties(Escript PROPERTIES PUBLIC_HEADER include/)
-target_include_directories(Escript PUBLIC
-	${EFL_INCLUDE_DIRS}
-	include/)
-target_link_libraries(Escript
-	${EFL_LIBRARIES})
diff --git a/escript/meson.build b/escript/meson.build
new file mode 100644
index 0000000..5def965
--- /dev/null
+++ b/escript/meson.build
@@ -0,0 +1,16 @@
+subdir('src')
+libescript_includes = include_directories('include')
+libescript_deps = [
+	dependency('eina', version: '>= 1.24.0'),
+]
+libescript = static_library(
+	'escript', libescript_files,
+	include_directories: libescript_includes,
+	dependencies: libescript_deps
+)
+
+libescript_deps = declare_dependency(
+	include_directories: libescript_includes,
+	link_with: libescript,
+	dependencies: libescript_deps
+)
diff --git a/escript/src/meson.build b/escript/src/meson.build
new file mode 100644
index 0000000..d1728ef
--- /dev/null
+++ b/escript/src/meson.build
@@ -0,0 +1,4 @@
+libescript_files = files([
+	'escript.c',
+	'lexer.c'
+])
diff --git a/eshell/CMakeLists.txt b/eshell/CMakeLists.txt
deleted file mode 100644
index 6ed482e..0000000
--- a/eshell/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-project(
-	Eshell
-	VERSION 0.0
-	DESCRIPTION "Eshell shell program"
-	LANGUAGES C)
-
-# TODO not just PkgConfig
-find_package(PkgConfig)
-pkg_check_modules(EFL REQUIRED efl ecore)
-
-add_executable(Eshell
-	src/main.c src/eshell.c)
-
-set_target_properties(Eshell PROPERTIES OUTPUT_NAME "eshell")
-target_include_directories(Eshell PUBLIC
-	${EFL_INCLUDE_DIRS} Escript) #hack...
-target_link_libraries(Eshell
-	${EFL_LIBRARIES} Escript)
diff --git a/eshell/meson.build b/eshell/meson.build
new file mode 100644
index 0000000..7202400
--- /dev/null
+++ b/eshell/meson.build
@@ -0,0 +1,11 @@
+subdir('src')
+
+deps = [
+	dependency('ecore', version: '>= 1.24.0'),
+]
+
+eshell = executable(
+	'eshell', eshell_files,
+	include_directories: include_directories(['src']),
+	dependencies: [libescript_deps, deps]
+)
diff --git a/eshell/src/meson.build b/eshell/src/meson.build
new file mode 100644
index 0000000..f1449ff
--- /dev/null
+++ b/eshell/src/meson.build
@@ -0,0 +1,4 @@
+eshell_files = files([
+	'main.c',
+	'eshell.c',
+])
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..c38c93b
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,6 @@
+project('eshell_root', 'c', version: '0.0.0', license: 'BSDv2',
+        default_options: ['buildtype=plain', 'c_std=gnu99'],
+        meson_version: '>= 0.47.0')
+
+subdir('escript')
+subdir('eshell')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to