Skip to content

Conversation

GavinNL
Copy link
Contributor

@GavinNL GavinNL commented Dec 26, 2019

Library name and version: lua/5.3.5

Copied the recipe from sqlite and then modified.

Tested on Linux Mint 19.2 GCC7 using the following

export CONAN_HOOK_ERROR_LEVEL=40
conan create . 5.3.5@test/test

CMakeLists.txt file copied with permission from https://github.com/helmesjo/conan-lua

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@conan-center-bot
Copy link
Contributor

Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue.

@claassistantio
Copy link

claassistantio commented Dec 26, 2019

CLA assistant check
All committers have signed the CLA.

@uilianries
Copy link
Member

Hi @GavinNL ! Thanks for your contribution, could you please sign your name on the issue #4 You need be a Beta user to continue this PR.

@GavinNL
Copy link
Contributor Author

GavinNL commented Dec 26, 2019

Hi @GavinNL ! Thanks for your contribution, could you please sign your name on the issue #4 You need be a Beta user to continue this PR.

Done!

@@ -0,0 +1,87 @@
cmake_minimum_required(VERSION 2.8.12)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you find this Cmake file? Did you try the port in vcpkg? Some definitions that I saw there in vcpkg are not here in this file. Unfortunately, the Lua's author don't want native cmake support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I use the one from vcpkg instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please. It's more maintained and contain extra features, as compiler definitions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GavinNL ping

from distutils.dir_util import copy_tree


license = """================================================================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not copy the license directly in the recipe. Extract it from src/lua.h. Take a look here to understand how to extract: https://docs.conan.io/en/latest/howtos/extract_licenses_from_headers.html

"""

class LuaConan(ConanFile):
no_copy_source = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
no_copy_source = True

Use no_copy_source only for header-only

exports_sources = ["CMakeLists.txt"]

_source_subfolder = "source_subfolder"
_build_subfolder = "build_subfolder"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_build_subfolder = "build_subfolder"

You are not using this.

@@ -0,0 +1,34 @@
From 3a53ea1f692251c052bf0b99cbc484c4f6641a8d Mon Sep 17 00:00:00 2001
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you find this patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errr...that shouldn't be there...I copied the whole recipe from GLM I believe


def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)
self.cpp_info.includedirs.append("include/lua")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.cpp_info.includedirs.append("include/lua")
self.cpp_info.includedirs.append("include/lua")
if self.settings.os == "Linux":
self.cpp_info.system_libs = ["m"]

Take a look in the makefile

@conan-center-bot
Copy link
Contributor

Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue.

@conan-center-bot
Copy link
Contributor

Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@uilianries
Copy link
Member

@GavinNL I've added cpp as optional, please take a look: GavinNL#1

@conan-center-bot
Copy link
Contributor

Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue.

uilianries
uilianries previously approved these changes Dec 27, 2019
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- lua.hpp is no included when compile_as_cpp is turned on.
- needed to modify the test_package CMakeLists file to include a preprocessor definition when compiling with compile_as_cpp turned on
@conan-center-bot
Copy link
Contributor

Sorry, the build is only launched for Early Access Program users. You can request access writing in this issue.

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove explicit COMPILE_AS_CPP from cmake and conanfile in test package

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget about, LGTM.

@conan-center-bot
Copy link
Contributor

All green in build 6 (9edaedfa3b156016937846f5fa3b3e6890301b9c)! 😊

@danimtb danimtb requested a review from SSE4 January 10, 2020 12:04
@madebr madebr mentioned this pull request Jan 11, 2020
4 tasks
@conan-center-bot
Copy link
Contributor

All green in build 7 (9edaedfa3b156016937846f5fa3b3e6890301b9c)! 😊

@uilianries
Copy link
Member

@SSE4 Will be really happy reviewing this PR, he loves Lua! 🙊

@danimtb danimtb assigned danimtb and unassigned GavinNL Jan 29, 2020
@danimtb danimtb merged commit 729af65 into conan-io:master Jan 29, 2020
@GavinNL GavinNL deleted the lua-5.3.5 branch March 7, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants