Home Help Center

How to CMake link to C++ Linux SO files

mwpowellhtxmwpowellhtx Member Michael PowellOrganization: DetectachemProject: SEEKER ✭✭
And/or statically link (TBD).

I've got the Ice 3.4.2 environment built for Linux and project mostly compiling to validate some functionality.

I am learning CMake and need a little help, how do we identify linker directories and/or files to the CMake system?

After that I think I can get it going.

Thanks!

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Michael,

    We don't provide CMake support for Ice, and we don't have any CMake modules for use Ice with CMake.

    There are projects using CMake and Ice that have build its own CMake modules, you can do a google search for "cmake ice", but we don't offer any kind of support for this cmake modules.

    If you need CMake officially supported you could consider to sponsor this feature, please contact us at [email protected] if you are interesting in sponsor this feature.
  • rleighrleigh Member Roger LeighOrganization: University of DundeeProject: OMERO (Open Microscopy Environment)
    Dear Michael,

    You might be interested in

    http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindIce.cmake;hb=refs/heads/next

    which is native cmake support for Ice, currently under review. Just add to your cmake file:
    find_package(Ice 3.4.0 REQUIRED Ice IceUtil Glacier2)
    

    and this will find an Ice version greater than or equal to 3.4.0, and find the Ice, IceUtil and Glacier2 libraries which are then made available as Ice_LIBRARIES for linking. You can of course adjust the minimum version and required libraries to suit your project. It identifies all of the slice2xxx programs, includes, slice includes and libraries for use in your cmake script. All the options and variables are documented in the above link.


    Regards,
    Roger
Sign In or Register to comment.