Skip to content

Comments

Update cmake scripts#24

Merged
ddemidov merged 4 commits intomasterfrom
update-cmake
Apr 26, 2017
Merged

Update cmake scripts#24
ddemidov merged 4 commits intomasterfrom
update-cmake

Conversation

@ddemidov
Copy link
Owner

@ddemidov ddemidov commented Apr 25, 2017

Provide install target, which installs the library, the header, and the cmake configuration scripts to ${CMAKE_INSTALL_PREFIX} dir. (I guess this can be used later to prepare a debian package).

After that, users may link to the library by adding the following to their cmake scripts:

find_package(ev3dev)
add_executable(myrobot myrobot.cpp)
target_link_libraries(myrobot ev3dev::ev3dev)

The IMPORTED target ev3dev::ev3dev, when linked against, will propagate the appropriate compile options, preprocessor definitions, and linker flags to the user target.

Also register the build directory in the cmake user package registry, so
that find_package(ev3dev) may be used as soon as local copy of ev3dev-lang-cpp has been configured, without a system-wide installation.

Provide install target, which installs the library, the header, and the
cmake configuration scripts to `${CMAKE_INSTALL_PREFIX}` dir.

After that, users may use the library by adding the following to their
cmake scripts:

    find_package(ev3dev)
    add_executable(myrobot myrobot.cpp)
    target_link_libraries(myrobot ev3dev::ev3dev)

The IMPORTED target `ev3dev::ev3dev`, when linked against, will take
propagate the appropriate compile options, preprocessor definitions,
and linker flags.

Also register the build directory in the cmake user package registry, so
that `find_package(ev3dev)` may be used as soon as local copy of
`ev3dev-lang-cpp` has been configured, without a systemwide
installation.
Need to recompile ev3dev.cpp with SYS_ROOT redefined.
@ddemidov ddemidov merged commit 3d5d703 into master Apr 26, 2017
@ddemidov ddemidov deleted the update-cmake branch April 26, 2017 07:57
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.

1 participant