Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Building TheIDE with using CMake
Re: Building TheIDE with using CMake [message #32317 is a reply to message #32316] Sun, 08 May 2011 15:03 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Lionel.
Thanks for kind words.

I looked at your Waf build script. It's kind of "universal" build system for U++ packages.

The purposes of this thread is a bit different. It shows the possibility to create and build (using various native generators) complex U++ application(s), with using CMake.

Currently, one of the problems with *.icpp files solved directly, by renaming them to regular *.cpp files and building them alongside with "main" sources of application. It have some drawback, - additional step before building - and advantage, - correctly builds inside other IDEs, supported by CMake, without additional custom build steps (which also may be the possibility, otherwise).

Also, it possible to "globbing" C/C++ files to create list of sources to build, using aux_source_directory CMake command. But it is not used, - full sources provided in the list.

The "general" solution, for using with different U++ applications, can be some kind of CMake module(s), which resolves possible U++ build flags (e.g. flagGCC, flagMSC, - for compilers; flagBSD, flagFREEBSD, flagLINUX, flagOSX11, flagPOSIX - for platforms/OS, etc.) and checks include/linker directories. Now, it just have some CMake equivalents.

Honestly to say, I created CMakeLists.txt files for all current uppsrc packages, which gives me some kind of global review of used build flags/libraries, etc. But much of them, is kind of
set(SRC_LIST
	# C/C++ files
)

add_library(PackageName ${SRC_LIST})

set(USES_LIST) # dependent packages to link
set(LINK_LIST) # libraries to link

if(DEFINED USES_LIST)
	add_dependencies(PackageName ${USES_LIST})
endif(DEFINED USES_LIST)

if(DEFINED USES_LIST OR DEFINED LINK_LIST)
	target_link_libraries(PackageName ${USES_LIST} ${LINK_LIST})
endif(DEFINED USES_LIST OR DEFINED LINK_LIST)


Most of the "Core" packages is already there (Core, CtrlCore, CtrlLib, Draw, etc. packages).

Edit (08.05.2011): Added UppToCMakeLists.cmake script to attachments for partial conversion of U++ package to CMakeLists.txt file.
Edit: Fixed flag name for FreeBSD (flagFREEBSD).

[Updated on: Sat, 14 February 2015 13:02]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: plugin/wav does not compile on clang or mingw on windows
Next Topic: New STEM4U package
Goto Forum:
  


Current Time: Sat May 11 06:50:24 CEST 2024

Total time taken to generate the page: 0.03118 seconds