Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup a working CMake build (#3504) #4014

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "parts"]
path = parts
url = https://github.com/fritzing/fritzing-parts.git
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.1.0)
project(Fritzing VERSION 0.6.4 LANGUAGES C CXX)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

# Build application
add_subdirectory(src)

# Build parts library
add_custom_target(fritzing_parts
COMMAND fritzing -db "${CMAKE_CURRENT_BINARY_DIR}/parts.db" -pp ${CMAKE_SOURCE_DIR}/parts
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/parts.db)
32 changes: 32 additions & 0 deletions cmake/Modules/Findlibgit2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# - Try to find the libgit2 library
# Once done this will define
#
# LIBGIT2_FOUND - System has libgit2
# LIBGIT2_INCLUDE_DIR - The libgit2 include directory
# LIBGIT2_LIBRARIES - The libraries needed to use libgit2
# LIBGIT2_DEFINITIONS - Compiler switches required for using libgit2


# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
#FIND_PACKAGE(PkgConfig)
#PKG_SEARCH_MODULE(PC_LIBGIT2 libgit2)

SET(LIBGIT2_DEFINITIONS ${PC_LIBGIT2_CFLAGS_OTHER})

FIND_PATH(LIBGIT2_INCLUDE_DIR NAMES git2.h
HINTS
${PC_LIBGIT2_INCLUDEDIR}
${PC_LIBGIT2_INCLUDE_DIRS}
)

FIND_LIBRARY(LIBGIT2_LIBRARIES NAMES git2
HINTS
${PC_LIBGIT2_LIBDIR}
${PC_LIBGIT2_LIBRARY_DIRS}
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgit2 DEFAULT_MSG LIBGIT2_LIBRARIES LIBGIT2_INCLUDE_DIR)

MARK_AS_ADVANCED(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES)
1 change: 1 addition & 0 deletions parts
Submodule parts added at c53679
40 changes: 0 additions & 40 deletions pri/autoroute.pri

This file was deleted.

64 changes: 0 additions & 64 deletions pri/boostdetect.pri

This file was deleted.

39 changes: 0 additions & 39 deletions pri/gitversion.pri

This file was deleted.

21 changes: 0 additions & 21 deletions pri/help.pri

This file was deleted.

87 changes: 0 additions & 87 deletions pri/items.pri

This file was deleted.

44 changes: 0 additions & 44 deletions pri/kitchensink.pri

This file was deleted.

Loading