-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: soblin <[email protected]>
- Loading branch information
Showing
3 changed files
with
9 additions
and
17 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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
# create library | ||
add_library(test_shared_lib SHARED test_lib.cpp) | ||
target_compile_options(test_shared_lib PUBLIC "-fPIC") | ||
target_include_directories( | ||
test_shared_lib PUBLIC ${Python3_INCLUDE_DIRS} | ||
${matplotlibcpp17_INCLUDE_DIRS}) | ||
target_link_libraries(test_shared_lib ${Python3_LIBRARIES} pybind11::embed) | ||
target_link_libraries(test_shared_lib matplotlibcpp17::matplotlibcpp17) | ||
# link it | ||
add_executable(test_lib_main test_lib_main.cpp) | ||
target_link_libraries(test_lib_main test_shared_lib) |
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
# create library | ||
add_library(test_static_lib STATIC test_lib.cpp) | ||
target_compile_options(test_static_lib PUBLIC "-fPIC") | ||
target_include_directories( | ||
test_static_lib PUBLIC ${Python3_INCLUDE_DIRS} | ||
${matplotlibcpp17_INCLUDE_DIRS}) | ||
target_link_libraries(test_static_lib ${Python3_LIBRARIES} pybind11::embed) | ||
target_link_libraries(test_static_lib matplotlibcpp17::matplotlibcpp17) | ||
# link it | ||
add_executable(test_lib_static_main test_lib_main.cpp) | ||
target_link_libraries(test_lib_static_main test_static_lib) |