Commit 9e8cd340 authored by Whitney Armstrong's avatar Whitney Armstrong

new file: CMakeLists.txt

parent 88a908c3
cmake_minimum_required (VERSION 3.6)
project (PHYSICA C Fortran)
find_package(Threads REQUIRED)
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIRS})
find_library(KERNLIB
NAMES libkernlib kernlib
#HINTS "${CMAKE_PREFIX_PATH}/lib"
)
find_library(PACKLIB
NAMES libpacklib packlib
#HINTS "${CMAKE_PREFIX_PATH}/lib"
)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -malign-double -fno-second-underscore -fno-automatic -frecord-marker=4 -Dgfortran -Dunix ")
add_subdirectory (gplot)
add_subdirectory (mud)
add_subdirectory (physica)
# FFLAGS = -g -malign-double -fno-second-underscore -fno-automatic -frecord-marker=4
# MACROS = -Dgfortran -Dunix
#ifeq (${HAVE_CERNLIB},YES)
# KERNLIB = $(CERN_DIR)/libkernlib.a
# PACKLIB = $(CERN_DIR)/libpacklib.a
#else
# KERNLIB =
# PACKLIB =
#endif
#
#GPLOT_LIB = $(GPLOT_DIR)/libgplot.a
#MUD_LIB = $(MUD_DIR)/lib/libmud.a
#PHYSICA_LIB = $(PHYSICA_DIR)/physica.a
#
#INCLUDES = -I/usr/X11R6/include -I/usr/local/include -I/$(HOME)/include
#OTHER_LIBS = -L/usr/lib -lX11 -L$(HOME)/lib64 -lgd $(HOME)/lib64/libgd.a -lpng -lz -lreadline -lncurses -lnsl -lpthread
add_executable(Physica physica/src/phys_main.F )
target_link_libraries(Physica physicalib Threads::Threads ${PACKLIB} ${KERNLIB} ${X11_LIBRARIES} mudlib gplot)
#$add_executable(physica physicalib gplot mud kernlib packlib )
#physica : $(PHYSICA_LIB)
# $(FORTRAN) -o $@ -Wl,-u,MAIN__ \
# $(PHYSICA_LIB) $(MUD_LIB) $(GPLOT_LIB) $(KERNLIB) $(PACKLIB) $(OTHER_LIBS)
#ifeq (${HAVE_CERNLIB},YES)
# XSRCS = $(PHYSICA_DIR)/src/physica_minuit.F \
# $(PHYSICA_DIR)/src/map_hbook_dum.F \
# $(PHYSICA_DIR)/src/rstr_hbook.F
#else
# XSRCS = $(PHYSICA_DIR)/src/cern_dum.F
#endif
#
#CSRCS = $(PHYSICA_DIR)/src/physica_malloc.c \
# $(PHYSICA_DIR)/src/physica_free.c \
# $(PHYSICA_DIR)/src/x_resize_window.c \
# $(PHYSICA_DIR)/src/digitize_png.c \
# $(PHYSICA_DIR)/src/readline_wrapper.c \
# $(PHYSICA_DIR)/src/linux/rstr_mudc.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment