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

add cmake on linux #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
48 changes: 48 additions & 0 deletions linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.10)

set(ProjectName "DragGan-NCNN")
project(${ProjectName})
message("ProjectName: ${ProjectName}")

set(CMAKE_BUILD_TYPE Release)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(ncnn_DIR ${PROJECT_SOURCE_DIR}/lib/cmake/ncnn)
# add your own path to qt5
set(CMAKE_PREFIX_PATH "[PATH TO]/qt5/5.14.2/gcc_64/lib/cmake/")

add_definitions("-fPIC")


find_package(ncnn REQUIRED)
find_package(Qt5 COMPONENTS
Core
Gui
Widgets
REQUIRED)

find_package(OpenCV REQUIRED)


add_executable(${ProjectName}
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
mainwindow.qrc
)

target_include_directories(${ProjectName} PUBLIC
${OpenCV_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include
)

target_link_libraries(${ProjectName}
${OpenCV_LIBS}
ncnn
Qt5::Core
Qt5::Gui
Qt5::Widgets
)

Binary file added linux/DragGan-NCNN
Binary file not shown.
Empty file.
Loading