Skip to content

Commit 7abbc40

Browse files
Merge pull request #12 from Guillaumebeuzeboc/dev/package
Dev/package
2 parents bef817c + 08a4bd0 commit 7abbc40

20 files changed

+69
-42
lines changed

CMakeLists.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/haricot/cmake/TopLevelCMake.txt

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
# Cmake_multi_repo_template
1+
# Haricot
22
Test of a mutli repo Cmake based template
33
Packages can contains C++ and Python code
44
Tested only on Linux with cmake 3.13.2 and 3.5.1
55

66
## Usage
77

8-
- `./configure`
8+
- `./haricot`
99
- `cd build/src/mypkg; cpack`
1010
- `cd build; ninja install`
1111
## Features
1212

1313
Top level CMakeLists.txt architecture
14-
The CmakeLists.txt in packages (Subdirectories) are standards (except that they can use extra features)
14+
The CMakeLists.txt in packages (Subdirectories) are standards (except that they can use extra features)
1515

1616
- Build all the packages (subdiretories)
1717
- Export pkg.cmake in order to includes them in another project/package
1818
- Assign a version number
1919
- Install targets/headers in the install directory at the root of the project
2020
- Generate .deb for each packages
2121

22+
## Create a new workspace
23+
24+
You can create a ws that would use haricot. To do that you would just have to create a symbolic link to the TopLevelCMake.txt the setup_local.zsh and to the haricot cmd (use the repo as an example).
25+
You can even combien workspace.
2226

2327
## Add a package (subdirectory)
2428

haricot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/haricot/haricot

setup.zsh

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.zsh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/haricot/setup_local.zsh

setup_package.zsh

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/a_lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ INIT_PKG()
77
SETUP_PYTHON_PKG()
88

99
include_directories(include ${Boost_INCLUDE_DIR} )
10-
add_library(a_lib
10+
add_library(a_lib SHARED
1111
src/lib.cpp)
1212

1313
target_include_directories(a_lib PUBLIC

src/a_lib/src/lib.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ void liba_function()
1010
std::string s("2001-10-9"); //2001-October-09
1111
date d(from_simple_string(s));
1212
std::cout << to_simple_string(d) << std::endl;
13+
std::cout << "this is a_lib" << std::endl;
1314
}
1415
catch(std::exception& e) {
1516
std::cout << " Exception: " << e.what() << std::endl;

src/haricot/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
project(haricot)
2+
3+
INIT_PKG()
4+
5+
SETUP_PKG(haricot)
6+
7+
install(DIRECTORY cmake/ DESTINATION share/haricot/cmake COMPONENT HARICOT)
8+
install(FILES haricot setup_install.zsh setup_local.zsh DESTINATION share/haricot COMPONENT HARICOT)
9+
install(FILES setup.zsh DESTINATION . COMPONENT HARICOT)
10+
BUILDDEB()

0 commit comments

Comments
 (0)