Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

CMake module for openFrameworks

$
0
0

Ok so there you go: https://github.com/openframeworks/openFrameworks/pull/4430

Look at PR content if you want to know what such a cmake module config file does. Basically setting openFrameworks_INCLUDES and openFrameworks_LIBRARIES properly..

In my example CMake project using this, it looks like this:

set(PROJECT etudes)

project(${PROJECT})
cmake_minimum_required(VERSION 3.0)

set(openFrameworks_DIR $ENV{OPENFRAMEWORKS_ROOT}/cmake)
find_package(openFrameworks REQUIRED)

add_executable(${PROJECT} src/main.cpp)

target_include_directories(${PROJECT}
    PUBLIC ${openFrameworks_INCLUDES})

target_link_libraries(${PROJECT}
    PUBLIC ${openFrameworks_LIBRARIES})

So yeah that's basically it, working CMake project building against openFrameworks. All I need to do as of now is to set OPENFRAMEWORKS_ROOT in the environment before invoking cmake, due to the fact that oF is not (yet) deployed in a standard fashion, where if installed systemwide it would be found automatically, or, if installed in a custom location, I would need to set CMAKE_PREFIX_PATH as usual. If people want to test this after it's merged on VS and osx that would be great, since I can't.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>