Skip to content

Commit

Permalink
Use CMake to run the build process
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo authored and eranif committed Dec 1, 2019
1 parent 3496495 commit 30d1508
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ jobs:
- run: apt-get update -y
- run: apt-get install -y libgtk2.0-dev pkg-config build-essential git cmake libssh-dev libwxbase3.0-dev libsqlite3-dev libwxsqlite3-3.0-dev
- run: mkdir build-release
- run: cd build-release && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. -DMAKE_DEB=1
- run: cd build-release && make -j4
- run: cd build-release && cmake .. -DCMAKE_BUILD_TYPE=Release -DMAKE_DEB=1
- run: cd build-release && cmake --build . --target package -j 4
- run: mkdir deb && mv build-release/*.deb deb
- store_artifacts: {path: ./deb}

workflows:
version: 2
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ if ( WITH_SFTP )
if (UNIX AND NOT APPLE )
## Linux / FreeBSD
message("**** NOTICE: Install libssh-dev and try again")
else (UNIX AND NOT APPLE )
elseif (NOT MINGW )
## OSX
message("**** NOTICE: Install libssh and try again (brew install libssh)")
endif (UNIX AND NOT APPLE )
endif ()
message(FATAL_ERROR "-- Could not find libssh")
endif( LIBSSH_NOT_FOUND_POS GREATER -1 )

Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ More information can be found here:
- [Official Website][3]
- [Download Page][4]
- [Wiki][5]

----------

Building CodeLite on Linux
Expand Down Expand Up @@ -42,12 +42,14 @@ Git clone the sources:

Run CMake and build CodeLite:

cd codelite
mkdir build-release
cd build-release
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make -j
sudo make install
```bash
cd codelite
mkdir build-release
cd build-release
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . -j $(nproc)
sudo cmake --build . --target install
```

----------

Expand All @@ -62,7 +64,7 @@ Prerequisites:
- Xcode
- Xcode command-line tools
- Homebrew.

Preparation:
- (Optional) Make a separate folder for building if you want to get rid of all except the .app file after building
- Install Xcode from Mac App Store
Expand All @@ -76,7 +78,7 @@ Preparation:
- Install Git: `brew install git`
- Install CMake: `brew install cmake`
- Install wxWidgets: `brew install wxmac --dev --use-llvm`


Clone the repo (lets assume that you have a folder `/Users/YOU/src`)

Expand All @@ -85,20 +87,20 @@ Clone the repo (lets assume that you have a folder `/Users/YOU/src`)
git clone https://github.com/eranif/codelite.git
```
the above will create the folder `/Users/YOU/codelite`

To build CodeLite:

```bash
cd /Users/YOU/codelite
mkdir build-release
cd build-release
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4
make install
cmake --build . -j $(sysctl -n hw.physicalcpu)
cmake --build . --target install
```

You should now have an app bundle `/Users/YOU/codelite/build-release/codelite.app`

To launch CodeLite:

`open /Users/YOU/codelite/build-release/codelite.app`
Expand Down
4 changes: 2 additions & 2 deletions make-weekly
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ os_name=`uname -s`
if [ ${os_name} == "Darwin" ]; then
echo rm -f $curdir/build-release/codelite.app.tar.gz
rm -f $curdir/build-release/codelite.app.tar.gz
cpu_count=4
cpu_count=`sysctl -n hw.physicalcpu`
else
cpu_count=`grep -c ^processor /proc/cpuinfo`
cpu_count=`nproc`
fi

## parse the command line arguments and over defaults
Expand Down

0 comments on commit 30d1508

Please sign in to comment.