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

Experimental Emscripten build support #250

Closed
wants to merge 8 commits into from

Conversation

jcowles
Copy link
Contributor

@jcowles jcowles commented Dec 22, 2013

This change adds a new flag to the CMake build system which allows the user to specify the emscripten directory, which will turn on a new "JAVASCRIPT" flag. This flag disables several library dependencies and configures the build to find OpenGL in the emscripten system/include directory.

Also added some brief documentation in README.md

An object library allows other build targets to use the object files
from this library.

The change introduces osd_static_cpu_obj which is consumed by
osd_static_cpu.

This will be useful for emscripten integration where we cant use the
compiled library, rather it will use the object files, targeting
osd_static_cpu_obj.
Explicitly disable various dependency lookups when JAVASCRIPT mode is
enabled. This is in preparation for emscripten builds.
When EMSCRIPTEN_DIR is set, also set the JAVASCRIPT flag, the C/C++
compilers to emcc and set various include paths to
$EMSCRIPTEN_DIR/system/include.
Further leverage cmake object libraries to share object files for CPU
and GPU OSD libraries, avoiding duplicate complation for dynamic/static
build passes.

CMake restricts object library inputs to header and source files, so the
.inc files were renamed to .gen.h (which seems like a better name
anyway) to make CMake happy.

Also updated the .gitignore file to ignore .gen.h files.
Now, CC/CXX will only be set to emcc if the variable
EMSCRIPTEN_CC_COMPILER and EMSCRIPTEN_CXX_COMPILER are not set.
Previously there were lots of separate if(NOT JAVASCRIPT) conditions, I've
tried to consolidate them to make the script more readable.
@jcowles
Copy link
Contributor Author

jcowles commented Jan 4, 2014

@manuelk How do you feel about the JAVASCRIPT flags now, after ab5b283 ?

@manuelk
Copy link

manuelk commented Jan 5, 2014

It's hard to read from the github's web diff... but i can probably live with it: I'll catch up with you next week to get this merged in.

@manuelk
Copy link

manuelk commented Nov 11, 2014

closing as deprecated (much of the work probably would have to be redone to match the current state of the code base)

@manuelk manuelk closed this Nov 11, 2014
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.

2 participants