Using lp:audience as an example, src/Config.vala.cmake is the bridge. http://bazaar.launchpad.net/~audience-members/audience/trunk/view/head:/CMakeLists.txt#L63
On Mon, Sep 16, 2013 at 3:43 AM, Kurt Smolderen <kurt.smolde...@empuly.net>wrote: > ** > > Dear elementary-devs, > > When looking at Noise's code, there is a nice integration between CMake > and the code itself via the Build-class: some properties defined in Noise > can be accessed in the vala code this way: > > // App info > build_data_dir = Build.DATADIR; > build_pkg_data_dir = Build.PKG_DATADIR; > build_release_name = Build.RELEASE_NAME; > build_version = Build.VERSION; > build_version_info = Build.VERSION_INFO; > > > > In this example, the properties DATADIR, PKG_DATADIR etc. are defined in > CMakeLists.txt and I think this is great as you have to change the properties > only in one place. > > > > However, when trying to use this concept in one of my own projects, I can't > find a way how to use this snippet. Where is this Build-class declared or how > are these variables linked from CMakeLists.txt to the vala source code file? > Do I have to add a specific class or should I add something to the > CMakeLists.txt file? > > > > Thanks for your help! > > > > Kind regards > > Kurt > > > > -- > Mailing list: https://launchpad.net/~elementary-dev-community > Post to : elementary-dev-community@lists.launchpad.net > Unsubscribe : https://launchpad.net/~elementary-dev-community > More help : https://help.launchpad.net/ListHelp > > -- Cody Garver
-- Mailing list: https://launchpad.net/~elementary-dev-community Post to : elementary-dev-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~elementary-dev-community More help : https://help.launchpad.net/ListHelp