Home » Developing U++ » UppHub » Building TheIDE with using CMake
Building TheIDE with using CMake [message #32310] |
Sat, 07 May 2011 20:32 |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
I see more people interested using CMake to build U++ applications.
This topic was mentioned a long time ago, discussed on U++ meetings, etc. Therefore, now I want to show what was done (in cross-platform way).
For the example, I took TheIDE application, which can be used to build other U++ applications, after its build.
Tested on Windows (for MSC9 and TDM-GCC 4.6.1 compilers) for 4179 svn revision (release version).
How to build:
1. Get uppsrc sources, either:
a) Download src archive from SourceForge.
b) Using svn checkout:
svn checkout -r 4179 http://upp-mirror.googlecode.com/svn/trunk/uppsrc upp
svn export upp uppsrc
c) Export ide packages using existing TheIDE, by clicking on "Output mode" drop list and then clicking on "All" button for selected export project directory.
2. If you want to build with rainbow support, get rainbow sources using svn checkout:
svn checkout -r 4179 http://upp-mirror.googlecode.com/svn/trunk/rainbow rainbow
svn export rainbow uppsrc/rainbow
In case of 1.c) you also need to copy Painter package directory to exported uppsrc directory.
3. Rename all *.icpp files to *.cpp files inside following directories (or use CMakeLists.txt files for reference from ISRC_LIST list):
CtrlCore, CtrlLib, ide/Browser, ide/Builders, PdfDraw, plugin/bmp, plugin/gif, plugin/jpg, plugin/png, RichEdit, RichText, Web.
In case of 2.: Painter.
Also, you can use following RenameFiles.cmake script:
Toggle Spoiler
# Recursive renaming of *.icpp to *.cpp files for specified directory
# Usage:
# cmake -P RenameFiles.cmake
# or
# cmake -DRENAME_PATH="SomePathWithFilesToRename" -P RenameFiles.cmake
# Note: -D options need to be specified before -P option, to apply.
cmake_minimum_required(VERSION 2.8)
if(NOT RENAME_PATH)
# uppsrc directory by default
set(RENAME_PATH uppsrc CACHE STRING "Directory with *.icpp files to rename" FORCE)
endif()
if(NOT EXISTS ${RENAME_PATH})
message(FATAL_ERROR "Selected directory doesn't exists: ${RENAME_PATH}")
else()
message("Selected directory: ${RENAME_PATH}")
endif()
file(GLOB_RECURSE FILE_LIST "${RENAME_PATH}/*.icpp")
list(LENGTH FILE_LIST files_count)
foreach(icppfile ${FILE_LIST})
get_filename_component(filename ${icppfile} NAME_WE)
get_filename_component(filepath ${icppfile} PATH)
set(cppfile ${filepath}/${filename}.cpp)
file(RENAME ${icppfile} ${cppfile})
endforeach()
if(${files_count} GREATER 0)
message("Files renamed: " ${files_count})
else()
message("No files to rename")
endif()
4. Copy CMakeLists.txt, *.cmake and build scripts files from attachments to source directory relative to uppsrc.
5. On Windows:
_start_here.bat
rem For GCC compiler
build.bat
rem For Microsoft Visual C++ 9.0 compiler
build_MSC9.bat
rem For rainbow support
build_MSC9_RAINBOW.bat
6. On FreeBSD (Linux, Unix, etc.):
./build.sh
# For rainbow support
./build_RAINBOW.sh
If all runs ok, ide(.exe) executable would be found inside install directories, relative to running commands.
CMakeLists.txt files and build scripts could be downloaded from attachments.
Full archive could be found here.
To note:
There were linking problems for MinGW version of build script with rainbow support, which I didn't include to attachment. The MSC9 version as is.
Edit:
Updated links to 4179 release version. But also applicable to 4193 release version.
[Updated on: Sun, 27 May 2012 22:19] Report message to a moderator
|
|
|
|
|
Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Building umk with using CMake
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
By: cyrion on Fri, 13 February 2015 13:16
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
By: cyrion on Fri, 13 February 2015 18:26
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
By: cyrion on Fri, 13 February 2015 18:34
|
|
|
Re: Building TheIDE with using CMake
By: cyrion on Fri, 13 February 2015 18:55
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
By: cyrion on Fri, 13 February 2015 19:30
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
By: cyrion on Sat, 14 February 2015 01:05
|
|
|
Re: Building TheIDE with using CMake
By: coolman on Thu, 26 May 2016 08:16
|
|
|
Re: Building TheIDE with using CMake
|
|
|
Re: Building TheIDE with using CMake
By: coolman on Fri, 15 July 2016 20:55
|
|
|
Re: Building TheIDE with using CMake
By: coolman on Thu, 25 August 2016 12:44
|
|
|
Re: Building TheIDE with using CMake
By: coolman on Mon, 29 August 2016 12:31
|
|
|
Re: Building TheIDE with using CMake
By: Klugier on Thu, 01 February 2018 23:03
|
|
|
Re: Building TheIDE with using CMake
By: coolman on Fri, 02 February 2018 07:09
|
|
|
Re: Building TheIDE with using CMake
By: coolman on Thu, 30 July 2020 12:05
|
Goto Forum:
Current Time: Sat May 11 11:30:44 CEST 2024
Total time taken to generate the page: 0.03176 seconds
|