Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor library build configuration #157

Merged
merged 7 commits into from Feb 27, 2017

Conversation

ppenzin
Copy link
Collaborator

@ppenzin ppenzin commented Feb 18, 2017

Move CMake code that builds ndll libraries down into their own directories in libs. Exclude both the library and its dependencies from the build if disabled via "WITH" CMake variables.

This change replaces WITH_NDLLS with a set of "WITH" variables, roughly one per optional library (mod_neko and mod_tora share one). It also brings the structure of "package" archive closer to structure of install directory (NDLLs appear in lib subdirectory).

Will fix #143

…tory to exclude the target and all its dependencies. To do that, remove libraries from WITH_NDLLS, since that list works as a list of physical files in the build directory. Move CMake configuration code to each library's subdirectory.

Move add_subdirectory(libs) to the end of master CMake file, enabling it to read all settings.

Fix libs that grab files from other directories (besides vm, leave that for later). Add static libraries for socket and sha1 and link them in instead of referencing files directly in dependent libraries.

Finally, remove WITH_NDLLS and update README to reflect new settings.
…s used. Move add_dependency calls that download sources down to subdirectories that use those sources.
…vior since CPack creates a package according to CMake config rules and ndlls are set to be installed in lib/neko.

Remove references to EXCLUDE_X_FROM_ALL variables from lib builds - since we are only building what we have configured it is unnecessary to exclude ndll targets from default target.

Disable verbose output of tar (unpack) in Travis CI (revert previous commit).
.travis.yml Outdated
@@ -59,7 +59,8 @@ install:
make source_archive_fat &&
tar xf bin/neko-*-${TRAVIS_OS_NAME}*.tar.gz &&
cd neko-*-${TRAVIS_OS_NAME}* &&
export PATH=`pwd`:$PATH;
export PATH=`pwd`:$PATH &&
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib/neko;
Copy link
Member

Choose a reason for hiding this comment

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

Does LD_LIBRARY_PATH really need to be modified?
With RELOCATABLE=ON, I think it can find libneko. Or is libneko being outputted to somewhere else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, thank you. NEKOPATH should be used instead, NDDLs are in that directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I fixed that in next commit

@andyli
Copy link
Member

andyli commented Feb 21, 2017

I think it is better to preserve the original flat archive structure, i.e. ndll files are placed next to libneko and others. Although I agree it is good to have a structure identical to how the files are installed, the archives are already being used in the wild, so changing its structure will break people's code. e.g. The TravisCI Haxe support use the binary archive to install Neko.

@ppenzin
Copy link
Collaborator Author

ppenzin commented Feb 21, 2017 via email

@ppenzin
Copy link
Collaborator Author

ppenzin commented Feb 23, 2017

I found the layout "fixer" script, just needed to run that after installing ndlls in the new CMake files. Will update the PR tonight.

…s in libs.

CMakeLists.txt - define a variable for "flatten" script location
libs - run the script on new targets
.travis.yml - revert NEKOPATH change, it is not needed with flat archive
@ppenzin
Copy link
Collaborator Author

ppenzin commented Feb 24, 2017

Now it should be back to the flat archive layout.

@andyli andyli merged commit a64e31d into HaxeFoundation:master Feb 27, 2017
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.

WITH_NDLLS CMake option not working
2 participants