Commit 40d13e09 authored by Berk Onat's avatar Berk Onat
Browse files

Add FindNetCDF.cmake to modules

parent 3f2c289c
...@@ -3,8 +3,9 @@ cmake_minimum_required(VERSION 2.8.12) ...@@ -3,8 +3,9 @@ cmake_minimum_required(VERSION 2.8.12)
project(molfileplugins) project(molfileplugins)
find_package(EXPAT) find_package(EXPAT)
find_package(NetCDF)
find_package(TCL) find_package(TCL)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/molfile_plugins/compile/cmake/Modules/")
find_package(NetCDF)
if (EXISTS "${TNG_INSTALL_DIR}/lib/libtng_io.dylib" if (EXISTS "${TNG_INSTALL_DIR}/lib/libtng_io.dylib"
OR EXISTS "${TNG_INSTALL_DIR}/lib/libtng_io.so" OR EXISTS "${TNG_INSTALL_DIR}/lib/libtng_io.so"
...@@ -32,8 +33,8 @@ if(TARGET_ARCH MATCHES "^.*64.*$") ...@@ -32,8 +33,8 @@ if(TARGET_ARCH MATCHES "^.*64.*$")
endif() endif()
set(LIB_MOLFILE_FILES set(LIB_MOLFILE_FILES
"${CMAKE_CURRENT_BINARY_DIR}/lib/libmolfile_plugins.a" "${CMAKE_SOURCE_DIR}/molfile_plugins/compile/lib/libmolfile_plugins.a"
"${CMAKE_CURRENT_BINARY_DIR}/lib/libmolfile_plugins.h") "${CMAKE_SOURCE_DIR}/molfile_plugins/compile/lib/libmolfile_plugins.h")
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
set(LINUX TRUE) set(LINUX TRUE)
...@@ -124,7 +125,7 @@ if(UNIX) ...@@ -124,7 +125,7 @@ if(UNIX)
OUTPUT ${LIB_MOLFILE_FILES} OUTPUT ${LIB_MOLFILE_FILES}
COMMAND make dynlibs staticlibs bins \"ARCH = ${TARGET_ARCH}\" \"COPTO = ${TARGET_COPT} \" \"LOPTO = ${TARGET_LOPT} \" \"CC = ${CMAKE_C_COMPILER} \" \"CXX = ${CMAKE_CXX_COMPILER} \" \"DEF = ${TARGET_DEF}\" \"CCFLAGS = ${TARGET_CFLAGS} \" \"CXXFLAGS = ${TARGET_CXXFLG} \" \"AR = ${TARGET_AR}\" \"NM = ${TARGET_NM}\" \"RANLIB = ${TARGET_RANLIB}\" \"LIBTOOL = ${TARGET_LIBTOOL} \" ${TARGET_MOL_LIBS} COMMAND make dynlibs staticlibs bins \"ARCH = ${TARGET_ARCH}\" \"COPTO = ${TARGET_COPT} \" \"LOPTO = ${TARGET_LOPT} \" \"CC = ${CMAKE_C_COMPILER} \" \"CXX = ${CMAKE_CXX_COMPILER} \" \"DEF = ${TARGET_DEF}\" \"CCFLAGS = ${TARGET_CFLAGS} \" \"CXXFLAGS = ${TARGET_CXXFLG} \" \"AR = ${TARGET_AR}\" \"NM = ${TARGET_NM}\" \"RANLIB = ${TARGET_RANLIB}\" \"LIBTOOL = ${TARGET_LIBTOOL} \" ${TARGET_MOL_LIBS}
COMMENT "Compiling libmolfile_plugin.a" COMMENT "Compiling libmolfile_plugin.a"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../molfile_plugin" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/molfile_plugins/molfile_plugin"
) )
endif() endif()
...@@ -151,7 +152,7 @@ if(WINCOMP) ...@@ -151,7 +152,7 @@ if(WINCOMP)
OUTPUT ${LIB_MOLFILE_FILES} OUTPUT ${LIB_MOLFILE_FILES}
COMMAND ${MYMAKE} dynlibs win32staticlibs "\" ARCH = ${TARGET_ARCH} \"" "\" COPTO = /Fo \"" "\" LOPTO = /OUT: \"" "\" ${TARGET_MOL_SETTINGS} \"" "\" DEF = ${TARGET_DEF} \"" "\" AR = ${TARGET_AR} \"" "\" NM = ${TARGET_NM} \"" "\" RANLIB = ${TARGET_RANLIB} \"" "\" SHLDFLAGS = ${TARGET_SHLDFLAGS} \"" "\"${TARGET_MOL_LIBS}\"" COMMAND ${MYMAKE} dynlibs win32staticlibs "\" ARCH = ${TARGET_ARCH} \"" "\" COPTO = /Fo \"" "\" LOPTO = /OUT: \"" "\" ${TARGET_MOL_SETTINGS} \"" "\" DEF = ${TARGET_DEF} \"" "\" AR = ${TARGET_AR} \"" "\" NM = ${TARGET_NM} \"" "\" RANLIB = ${TARGET_RANLIB} \"" "\" SHLDFLAGS = ${TARGET_SHLDFLAGS} \"" "\"${TARGET_MOL_LIBS}\""
COMMENT "Compiling libmolfile_plugin.a" COMMENT "Compiling libmolfile_plugin.a"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../molfile_plugin" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/molfile_plugins/molfile_plugin"
) )
endif() endif()
......
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