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

translate Cmake (CUDA/C++) project to fips #155

Open
ivandrodri opened this issue Sep 26, 2017 · 2 comments
Open

translate Cmake (CUDA/C++) project to fips #155

ivandrodri opened this issue Sep 26, 2017 · 2 comments

Comments

@ivandrodri
Copy link

Hello, I have a CUDA/C++ project build with cmake and I wanted to connect my code with oryol for 3D graphics but it uses fips instead of cmake and I don't know how to put all together in a single project.

I tried to include in the Cmakelists.txt in the oryol-test-app folder the commands:

fips_add_subdirectory(module1)
fips_add_subdirectory(module2)

where module1 and module2 are compiled with nvcc and they have their owns standard cmakes (without fips) but I don't know how to link the static libraries created by module1 and module2 in the Cmakelists.txt of TestApp

fips_begin_app(TestApp windowed)
fips_files(TestApp.cc)
oryol_shader(shaders.glsl)
fips_deps(Gfx Assets)
...... LINK EXTERNAL LIBS HERE ??? ......
fips_end_app()

Also it is possible to use nvcc compiler in fips?? Thanks in advanced for any help!!

@floooh
Copy link
Owner

floooh commented Sep 26, 2017

If cmake was running without errors, it should be possible to add the names of the libraries created in the external projects via fips_deps() (e.g. if module1 results in the static link library module1.lib, a fips_deps(module1).

In some cases it may be necessary to write your own CMakeLists.txt file to wrap an external project, even when the external project comes with its own CMakeLists.txt file to make the external project fully compatible with fips. I call this 'fipsification', as an example, see fips-glfw: https://github.com/floooh/fips-glfw

@ivandrodri
Copy link
Author

Thanks a lot for the information!

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

No branches or pull requests

2 participants