Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a60269a
commit fd3a9ef
Showing
8 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
project(demo_abc) | |||
cmake_minimum_required(VERSION 2.6) | |||
|
|||
add_subdirectory(src) | |||
add_subdirectory(demo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
project(demo_abc) | |||
cmake_minimum_required(VERSION 2.6) | |||
|
|||
include_directories(../include) | |||
#link_directories(../lib) | |||
link_directories(../src) | |||
|
|||
add_executable(demo_libabc demo_libabc.c) | |||
target_link_libraries(demo_libabc abc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
#include "libabc.h" | |||
|
|||
int main(){ | |||
a_fun(); | |||
b_fun(); | |||
c_fun(); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
void a_fun(); | |||
void b_fun(); | |||
void c_fun(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
project(demo_abc) | |||
cmake_minimum_required(VERSION 2.6) | |||
|
|||
|
|||
#this part of the project generates the library | |||
add_library(abc a b c) | |||
|
|||
# DOES NOT WORK DONT KNOW WHY | |||
#set(LIB_DIR ../lib/) | |||
#set_target_properties(abc PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${LIB_DIR}") | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
#include <stdio.h> | |||
void a_fun(){ | |||
printf("inside a_fun()\n"); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
#include <stdio.h> | |||
void b_fun(){ | |||
printf("inside b_fun()\n"); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
#include <stdio.h> | |||
void c_fun(){ | |||
printf("inside c_fun()\n"); | |||
} |