fips icon indicating copy to clipboard operation
fips copied to clipboard

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

Open ivandrodri opened this issue 8 years ago • 2 comments

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!!

ivandrodri avatar Sep 26 '17 13:09 ivandrodri

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

floooh avatar Sep 26 '17 17:09 floooh

Thanks a lot for the information!

ivandrodri avatar Sep 27 '17 15:09 ivandrodri