Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CMAKE for building Darkent on Linux
cmake_minimum_required(VERSION 3.15)
set(CMAKE_VERBOSE_MAKEFILE on)
#set (OpenCV_DIR /home/stiv2/opencv-4.1.2/build)
#find_package(OpenCV REQUIRED )
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ")
project(darknet)
set(CMAKE_CXX_STANDARD 14)
#add_definitions(-DOPENCV=1)
add_executable(darknet ./src/activation_layer.c ./src/data.c ./src/im2col.c ./src/logistic_layer.c ./src/parser.c ./src/tree.c
./src/activations.c ./src/connected_layer.c ./src/deconvolutional_layer.c ./src/image.c ./src/lstm_layer.c ./src/region_layer.c ./src/upsample_layer.c
./src/avgpool_layer.c ./src/convolutional_layer.c ./src/demo.c ./src/iseg_layer.c ./src/matrix.c ./src/reorg_layer.c ./src/utils.c
./src/batchnorm_layer.c ./src/cost_layer.c ./src/detection_layer.c ./src/l2norm_layer.c ./src/maxpool_layer.c ./src/rnn_layer.c ./src/yolo_layer.c
./src/blas.c ./src/crnn_layer.c ./src/dropout_layer.c ./src/layer.c ./src/network.c ./src/route_layer.c
./src/box.c ./src/crop_layer.c ./src/gemm.c ./src/list.c ./src/normalization_layer.c ./src/shortcut_layer.c
./src/col2im.c ./src/cuda.c ./src/gru_layer.c ./src/local_layer.c ./src/option_list.c ./src/softmax_layer.c
./examples/darknet.c ./examples/yolo.c ./examples/super.c ./examples/go.c ./examples/coco.c
./examples/cifar.c ./examples/detector.c ./examples/lsd.c ./examples/rnn.c ./examples/classifier.c
./examples/regressor.c ./examples/instance-segmenter.c ./examples/segmenter.c ./examples/art.c
./examples/tag.c ./examples/nightmare.c
)
target_include_directories(darknet PRIVATE ./include)
TARGET_LINK_LIBRARIES(darknet stdc++fs -lpthread -lm )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.