aboutsummaryrefslogtreecommitdiff
path: root/cli/CMakeLists.txt
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2016-08-01 08:20:23 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2016-08-01 08:20:23 +0200
commitbfeeac6e4889d1e9a1083b3c7efc59652981b168 (patch)
treea937d844a59da7c509685dcd1ddd9933772e526f /cli/CMakeLists.txt
parentc307e9f234e544386fa3ae53083c7510668e1716 (diff)
downloadkicad-utils-bfeeac6e4889d1e9a1083b3c7efc59652981b168.tar.gz
kicad-utils-bfeeac6e4889d1e9a1083b3c7efc59652981b168.tar.bz2
kicad-utils-bfeeac6e4889d1e9a1083b3c7efc59652981b168.tar.xz
kicad-utils-bfeeac6e4889d1e9a1083b3c7efc59652981b168.zip
o Moving the generation logic to Python, embedding a Python interpreter with the help of pybind11.
o Adding install configuration to CMake to make it easier to reuse the project later on. o Splitting out the examples into its own project to make it easier to test the whole installation setup and python/template loading. o Trying to reorganize the code a bit, not very much better yet.
Diffstat (limited to 'cli/CMakeLists.txt')
-rw-r--r--cli/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
new file mode 100644
index 0000000..f3dd326
--- /dev/null
+++ b/cli/CMakeLists.txt
@@ -0,0 +1,29 @@
+set(SOURCE_FILES generate-header.cpp)
+add_executable(generate-header ${SOURCE_FILES})
+
+target_link_libraries(generate-header PUBLIC kicad-utils-core)
+
+get_target_property(kicad_utils_py_include_directories kicad_utils_py INCLUDE_DIRECTORIES)
+target_include_directories(generate-header PRIVATE ${kicad_utils_py_include_directories})
+target_link_libraries(generate-header PUBLIC ${PYTHON_LIBRARIES} stdc++fs)
+
+add_dependencies(generate-header kicad_utils_py)
+
+install(TARGETS generate-header
+ EXPORT kicad_utils_export
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+install(DIRECTORY ../template/
+ DESTINATION share/kicad-utils/template
+ FILES_MATCHING PATTERN *.py
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
+
+install(DIRECTORY ../cmake/
+ DESTINATION lib/cmake/KicadUtils)
+
+install(EXPORT kicad_utils_export
+ FILE KicadUtilsTargets.cmake
+ NAMESPACE KicadUtils::
+ DESTINATION lib/cmake/KicadUtils)