Skip to content
Snippets Groups Projects
Commit ee350f15 authored by Hilb, Stephan's avatar Hilb, Stephan
Browse files

add cmake files

parent 4401b737
No related branches found
No related tags found
No related merge requests found
*.o
*.a
color_flow
colortest
build/
*.png
*.flo
cmake_minimum_required(VERSION 3.14)
project(flow-code LANGUAGES CXX)
add_subdirectory(imageLib)
add_executable(color_flow color_flow.cpp flowIO.cpp colorcode.cpp)
target_include_directories(color_flow PRIVATE imageLib)
target_link_libraries(color_flow PRIVATE imageLib PUBLIC png z)
add_executable(colortest colortest.cpp colorcode.cpp)
target_include_directories(colortest PRIVATE imageLib)
target_link_libraries(colortest PRIVATE imageLib PUBLIC png z)
# Makefile for flow evaluation code
SRC = flowIO.cpp colorcode.cpp colortest.cpp color_flow.cpp
BIN = colortest color_flow
IMGLIB = imageLib
CC = g++
WARN = -W -Wall
OPT ?= -O3
CPPFLAGS = $(OPT) $(WARN) -I$(IMGLIB)
LDLIBS = -L$(IMGLIB) -lImg -lpng -lz
EXE = $(SRC:.cpp=.exe)
all: $(BIN)
colortest: colortest.cpp colorcode.cpp
color_flow: color_flow.cpp flowIO.cpp colorcode.cpp
clean:
rm -f core *.stackdump
allclean: clean
rm -f $(BIN) $(EXE)
add_library(imageLib Convert.cpp Convolve.cpp Image.cpp ImageIO.cpp ImageIOpng.cpp RefCntMem.cpp)
SRC = Convert.cpp Convolve.cpp Image.cpp ImageIO.cpp ImageIOpng.cpp RefCntMem.cpp
CC = g++
WARN = -W -Wall
OPT ?= -O3
CPPFLAGS = $(OPT) $(WARN)
OBJ = $(SRC:.cpp=.o)
all: libImg.a
libImg.a: $(OBJ)
rm -f libImg.a
ar ruc libImg.a $(OBJ)
ranlib libImg.a
clean:
rm -f $(OBJ) core *.stackdump *.bak
allclean: clean
rm -f libImg.a
depend:
@makedepend -Y -- $(CPPFLAGS) -- $(SRC) 2>> /dev/null
# DO NOT DELETE THIS LINE -- make depend depends on it.
Convert.o: Image.h RefCntMem.h Error.h Convert.h
Convolve.o: Image.h RefCntMem.h Error.h Convert.h Convolve.h
Image.o: Image.h RefCntMem.h Error.h
ImageIO.o: Image.h RefCntMem.h Error.h ImageIO.h
ImageIOpng.o: Image.h RefCntMem.h Error.h
RefCntMem.o: RefCntMem.h
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment