gfrd / modern_egfrd

modern C++ implementation of eGfrd
GNU General Public License v2.0
7 stars 8 forks source link

CMake errors #2

Closed ssandrews closed 5 years ago

ssandrews commented 6 years ago

Hi,

I'm trying to build the eGFRD software and it gives an error during the CMake step. The error is:

CMake Error at src/gfrdVisualizer/CMakeLists.txt:9 (add_executable): Target "gfrdVisualizer" links to target "OpenGL::GL" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

Do you have suggestions on fixing this?

Thanks, -Steve

Seynen commented 6 years ago

Hi Steve, Building gfrdVisualizer was indeed failing. See commit 26 for the fix. Checked on Windows, Ubuntu and Centos. Let me know of it works for you as well.

Regards, Marco

ssandrews commented 6 years ago

Hi Marco,

Thanks for the quick reply. I'm writing a short review of particle-based simulation methods currently and so am testing out various things with the different programs at the moment. I have a lot more questions about GFRD, too, which I'm hoping you (or Pieter Rein or others) can answer.

First of all, I downloaded modern_egfrd-master from GitHub. Is this is the most current version of the software? And is it based upon Koichi's eGFRD algorithm, as the name suggests? Also, I've never understood E-Cell, which seems to be a large collection of tools, including eGFRD. What's the relationship between this eGFRD software and the eGFRD within E-Cell?

Next, is there any documentation about how to write input files for eGFRD simulations? I can guess at part of how to do things from the sample input files, but there are still many things that I don't understand. For example, what is "Matrix"? Also, how do I set the total simulation run time?

Does eGFRD allow for molecules with excluded volume?

Also, what does it do for system boundaries? Are they periodic, reflecting, or something else? And can the user define internal surfaces, such as cell membranes?

Thank you.

-Steve

On Tue, Oct 24, 2017 at 2:55 AM, Seynen notifications@github.com wrote:

Hi Steve, Building gfrdVisualizer was indeed failing. See commit 26 for the fix. Checked on Windows, Ubuntu and Centos. Let me know of it works for you as well.

Regards, Marco

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gfrd/modern_egfrd/issues/2#issuecomment-338938028, or mute the thread https://github.com/notifications/unsubscribe-auth/AfgjwdV19npaYVdRQ1c9ZU71iPtpPFtSks5svbP3gaJpZM4QDa1n .

ssandrews commented 6 years ago

Hi again,

I just tested your new commit, and I think that the prior bug is now fixed. However, running "make" now stops with missing glut symbols. By the way, I'm working on a Mac, with OS 10.12.

Things seemed promising with the CMake output, which found glut and completed successfully:

build$ cmake .. -DCMAKE_BUILD_TYPE=Release

-- The CXX compiler identification is AppleClang 9.0.0.9000038

-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.29.1")

-- Found GSL: /opt/local/include (found version "2.4")

-- Checking support for std::make_unique

-- Checking support for std::make_unique - not supported

-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework

-- Found GLUT: /System/Library/Frameworks/GLUT.framework

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/sandrews/SSA/post-INI/SimulatorsReview/eGFRD/modern_egfrd-master/build

However, when I ran make, it quit with the following errors:

Scanning dependencies of target gfrdVisualizer

[ 50%] Building CXX object src/gfrdVisualizer/CMakeFiles/gfrdVisualizer.dir/ExternalSim.cpp.o

[ 51%] Building CXX object src/gfrdVisualizer/CMakeFiles/gfrdVisualizer.dir/gfrdRenderer.cpp.o

[ 53%] Building CXX object src/gfrdVisualizer/CMakeFiles/gfrdVisualizer.dir/gfrdVisualizer.cpp.o

[ 54%] Building CXX object src/gfrdVisualizer/CMakeFiles/gfrdVisualizer.dir/ScreenShot.cpp.o

[ 55%] Linking CXX executable ../../bin/gfrdVisualizer

Undefined symbols for architecture x86_64:

"_glutBitmapHeight", referenced from:

  handleDisplay() in gfrdVisualizer.cpp.o

"_glutBitmapString", referenced from:

  drawParticle(std::__1::pair<ParticleID, Particle> const&, ParticleID,

int, Vector3 const&, World const*) in gfrdRenderer.cpp.o

drawAllShells(std::1::vector<std::1::pair<std::__1::reference_wrapper<Shell const>, unsigned int>, std::1::allocator<std::1::pair<std::__1::reference_wrapper<Shell const>, unsigned int> > > const&, Vector3 const&) in gfrdRenderer.cpp.o

  drawOrigin() in gfrdVisualizer.cpp.o

  handleDisplay() in gfrdVisualizer.cpp.o

"_glutFullScreenToggle", referenced from:

  handleKeyboard(unsigned char, int, int) in gfrdVisualizer.cpp.o

"_glutLeaveMainLoop", referenced from:

  handleKeyboard(unsigned char, int, int) in gfrdVisualizer.cpp.o

"_glutMouseWheelFunc", referenced from:

  _main in gfrdVisualizer.cpp.o

"_glutSetOption", referenced from:

  _main in gfrdVisualizer.cpp.o

"_glutSolidCylinder", referenced from:

  drawDisk(Disk const&, StructureTypeID const&, bool) in

gfrdRenderer.cpp.o

"_glutWireCylinder", referenced from:

drawAllShells(std::1::vector<std::1::pair<std::__1::reference_wrapper<Shell const>, unsigned int>, std::1::allocator<std::1::pair<std::__1::reference_wrapper<Shell const>, unsigned int> > > const&, Vector3 const&) in gfrdRenderer.cpp.o

  drawDisk(Disk const&, StructureTypeID const&, bool) in

gfrdRenderer.cpp.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [bin/gfrdVisualizer] Error 1

make[1]: *** [src/gfrdVisualizer/CMakeFiles/gfrdVisualizer.dir/all] Error 2

make: *** [all] Error 2

So, it's clearly not finding glut, despite the fact that CMake did find it. I recall having similar challenges with getting Smoldyn to find glut, after which I ended up with a completely different CMake structure for glut. I'm attaching my Smoldyn CMake file (I only use a single file for the entire build) in case its helpful. If you get stuck, let me know and I can try to do a little debugging.

Cheers, -Steve

On Tue, Oct 24, 2017 at 9:37 AM, Steve Andrews steven.s.andrews@gmail.com wrote:

Hi Marco,

Thanks for the quick reply. I'm writing a short review of particle-based simulation methods currently and so am testing out various things with the different programs at the moment. I have a lot more questions about GFRD, too, which I'm hoping you (or Pieter Rein or others) can answer.

First of all, I downloaded modern_egfrd-master from GitHub. Is this is the most current version of the software? And is it based upon Koichi's eGFRD algorithm, as the name suggests? Also, I've never understood E-Cell, which seems to be a large collection of tools, including eGFRD. What's the relationship between this eGFRD software and the eGFRD within E-Cell?

Next, is there any documentation about how to write input files for eGFRD simulations? I can guess at part of how to do things from the sample input files, but there are still many things that I don't understand. For example, what is "Matrix"? Also, how do I set the total simulation run time?

Does eGFRD allow for molecules with excluded volume?

Also, what does it do for system boundaries? Are they periodic, reflecting, or something else? And can the user define internal surfaces, such as cell membranes?

Thank you.

-Steve

On Tue, Oct 24, 2017 at 2:55 AM, Seynen notifications@github.com wrote:

Hi Steve, Building gfrdVisualizer was indeed failing. See commit 26 for the fix. Checked on Windows, Ubuntu and Centos. Let me know of it works for you as well.

Regards, Marco

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gfrd/modern_egfrd/issues/2#issuecomment-338938028, or mute the thread https://github.com/notifications/unsubscribe-auth/AfgjwdV19npaYVdRQ1c9ZU71iPtpPFtSks5svbP3gaJpZM4QDa1n .

Main CMakeLists.txt file to build Smoldyn, its libraries, and its utilities using CMake.

Written by Steve Andrews, April 16, 2012. Updated by Steve Andrews since then.

This file, and other files of the Smoldyn project, are licensed with LGPL license.

The primary Smoldyn web site is http://www.smoldyn.org.

Please report bugs and problems to support@smoldyn.org.

########## Basic setup ##########

project(smoldyn) cmake_minimum_required(VERSION 2.6) set(SMOLDYN_VERSION "2.54")

######### Targets to build ###########

option(OPTION_TARGET_SMOLDYN "Create stand-alone Smoldyn program" ON) option(OPTION_TARGET_LIBSMOLDYN "Create LibSmoldyn library" OFF)

####### Compiling options ##########

option(OPTION_VCELL "Compile Smoldyn for VCell" OFF) option(OPTION_NSV "Compile Smoldyn with NextSubvolume functionality" ON) option(OPTION_PDE "Compile Smoldyn with PDE functionality" OFF) option(OPTION_VTK "Compile Smoldyn with VTK functionality" OFF) option(OPTION_STATIC "Compile Smoldyn with static libraries" OFF) option(OPTION_MINGW "Cross-compile for Windows using MinGW compiler" OFF) option(OPTION_USE_OPENGL "Build with OpenGL support" ON) option(OPTION_USE_ZLIB "Build with Zlib support" OFF)

if (OPTION_VCELL) set(OPTION_USE_LIBTIFF OFF) set(OPTION_USE_ZLIB OFF) set(HAVE_ZLIB TRUE) set(OPTION_USE_ICONV OFF) set(HAVE_ICONV FALSE) else(OPTION_VCELL) option(OPTION_USE_LIBTIFF "Build with LibTiff support" ON) option(OPTION_USE_ICONV "Build with Libiconv support" OFF) endif(OPTION_VCELL)

if (OPTION_NSV) set(OPTION_LATTICE ON) endif (OPTION_NSV)

if (OPTION_PDE) set(OPTION_LATTICE ON) endif (OPTION_PDE)

if (OPTION_STATIC) set(OPTION_USE_ZLIB ON) endif(OPTION_STATIC)

######### Core code information ###########

set(HEADER_FILES source/lib/Geometry.h source/lib/List.h source/lib/math2.h source/lib/opengl2.h source/lib/parse.h source/lib/queue.h source/lib/random2.h source/lib/Rn.h source/lib/RnSort.h source/lib/rxnparam.h source/lib/SimCommand.h source/lib/Sphere.h source/lib/string2.h source/lib/SurfaceParam.h source/lib/Zn.h source/lib/SFMT/SFMT.h source/Smoldyn/smoldyn.h source/Smoldyn/smoldynfuncs.h source/vcell/SimpleMesh.h source/vcell/SimpleValueProvider.h source/NextSubVolume/nsvc.h source/vtk/vtkwrapper.h )

set(SRC_FILES source/lib/Geometry.c source/lib/List.c source/lib/math2.c source/lib/opengl2.c source/lib/parse.c source/lib/queue.c source/lib/random2.c source/lib/Rn.c source/lib/RnSort.c source/lib/rxnparam.c source/lib/SimCommand.c source/lib/Sphere.c source/lib/string2.c source/lib/SurfaceParam.c source/lib/Zn.c source/lib/SFMT/SFMT.c source/Smoldyn/smolbng.c source/Smoldyn/smolboxes.c source/Smoldyn/smolcmd.c source/Smoldyn/smolcomparts.c source/Smoldyn/smolfilament.c source/Smoldyn/smolgraphics.c source/Smoldyn/smolmolec.c source/Smoldyn/smolport.c source/Smoldyn/smollattice.c source/Smoldyn/smolreact.c source/Smoldyn/smolrule.c source/Smoldyn/smolsim.c source/Smoldyn/smolsurface.c source/Smoldyn/smolwall.c )

set(MAIN_FILES source/Smoldyn/smoldyn.c)

if(OPTION_VCELL) list(APPEND SRC_FILES source/Smoldyn/smoldynhybrid.c source/vcell/SimpleMesh.cpp source/vcell/SimpleValueProvider.cpp ) endif(OPTION_VCELL)

if(OPTION_TARGET_LIBSMOLDYN) list(APPEND HEADER_FILES source/Smoldyn/libsmoldyn.h) list(APPEND SRC_FILES source/Smoldyn/libsmoldyn.c) endif(OPTION_TARGET_LIBSMOLDYN)

set_source_files_properties(${SRC_FILES} PROPERTIES LANGUAGE CXX ) set_source_files_properties(${MAIN_FILES} PROPERTIES LANGUAGE CXX )

include_directories(source/lib source/Smoldyn source/vcell source/NextSubVolume source/vtk ${CMAKE_BINARY_DIR})

####### Build for debugging or release ##########

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(COMPILER_IS_CLANGXX TRUE) endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")

if(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX) set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wno-deprecated-declarations") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -Wno-deprecated-declarations -DNDEBUG") endif(CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANGXX)

if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the buid type: None, Debug, Release, RelWithDebInfo, or MinSizeRel" FORCE) endif(NOT CMAKE_BUILD_TYPE)

message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

####### Option: Compile with MinGW ##########

if (OPTION_MINGW) message(STATUS "Cross-compiling for Windows using MinGW libraries from: ${MINGWDIR}") endif(OPTION_MINGW)

######### Platform dependent information ##########

if (OPTION_VCELL) add_definitions(-D_CRT_SECURE_NO_WARNINGS) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/windows/glut-3.7.6) link_directories(${CMAKE_CURRENT_SOURCE_DIR}/source/vcell ${CMAKE_CURRENT_SOURCE_DIR}/windows/glut-3.7.6) if (ARCH_64bit) list(APPEND DEP_LIBS glut64) else() list(APPEND DEP_LIBS glut32 zlib) endif() elseif (OPTION_MINGW) include_directories(${MINGWDIR}/include windows) link_directories(${MINGWDIR}/lib)

list(APPEND DEP_LIBS opengl32 glu32 freeglut z)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static -s")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static -s")

endif()

set(APPLE_BUILD 0) set(NIX_BUILD 0) set(WINDOWS_BUILD 0) if(OPTION_MINGW) set(WINDOWS_BUILD 1) set(BNG2_PATH "%PROGRAMFILES%\\Smoldyn\\BioNetGen\\BNG2.pl") elseif(APPLE) set(APPLE_BUILD 1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5") set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl") else() set(NIX_BUILD 1) set(BNG2_PATH "/usr/local/bin/BioNetGen/BNG2.pl") endif()

####### Option: Build with OpenGL (gl and glu only, not glut) ##########

if (OPTION_USE_OPENGL AND OPTION_VCELL) set(HAVE_OPENGL TRUE) set(HAVE_GL_GLU_H TRUE) set(HAVE_GL_GL_H TRUE) elseif(OPTION_USE_OPENGL) if(OPTION_MINGW) find_file(HAVE_GL_GL_H GL/gl.h PATHS ${MINGWDIR}/include) find_file(HAVE_OPENGL_GL_H OpenGL/gl.h PATHS ${MINGWDIR}/include) find_file(HAVE_GL_GLU_H GL/glu.h PATHS ${MINGWDIR}/include) find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h PATHS ${MINGWDIR}/include)

    #find_path(OPEN_GL_INCLUDE_DIR gl.h PATHS ${MINGWDIR}/include/GL)
    get_filename_component(OPEN_GL_INCLUDE_DIR "${HAVE_GL_GL_H}" PATH)
    find_library(OPEN_GL_LIBRARIES libopengl32.a PATHS ${MINGWDIR}/lib)
    find_library(GLU32_LIBRARIES libglu32.a PATHS ${MINGWDIR}/lib)
else()
    find_file(HAVE_GL_GL_H GL/gl.h)
    find_file(HAVE_OPENGL_GL_H OpenGL/gl.h)
    find_file(HAVE_GL_GLU_H GL/glu.h)
    find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h)
    include(FindOpenGL)
endif()

if(OPENGL_FOUND)
    set(OPENGL_FOUND TRUE)
    message(STATUS "OpenGL found: '${OPENGL_INCLUDE_DIR}', '${OPENGL_LIBRARIES}'")
elseif(OPEN_GL_INCLUDE_DIR AND OPEN_GL_LIBRARIES)
    set(OPENGL_FOUND TRUE)
    message(STATUS "OpenGL found: '${OPEN_GL_INCLUDE_DIR}', '${OPEN_GL_LIBRARIES}'")
else()
    set(OPENGL_FOUND FALSE)
    message(FATAL_ERROR "OpenGL not found.  Building without OpenGL is possible.")
endif()

if(OPTION_MINGW)
    if(GLU32_LIBRARIES)
        message(STATUS "Glu32 found: '${GLU32_LIBRARIES}'")
    else()
        message(FATAL_ERROR "Glu32 not found.  Building without OpenGL is possible.")
    endif()
endif(OPTION_MINGW)

set(HAVE_OPENGL TRUE)
include_directories(${OPENGL_INCLUDE_DIR} ${OPEN_GL_INCLUDE_DIR})
list(APPEND DEP_LIBS ${OPENGL_LIBRARIES} ${OPEN_GL_LIBRARIES} ${GLU32_LIBRARIES})

endif()

####### Option: Build with OpenGL (glut only) ##########

if (OPTION_USE_OPENGL AND OPTION_VCELL) set(HAVE_GL_GLUT_H TRUE) elseif(OPTION_USE_OPENGL) if(OPTION_MINGW) find_file(HAVE_GL_GLUT_H GL/glut.h PATHS ${MINGWDIR}/include) find_file(HAVE_GLUT_GLUT_H GLUT/glut.h PATHS ${MINGWDIR}/include)

    get_filename_component(GLUT_INCLUDE_DIR "${HAVE_GL_GLUT_H}" PATH)
    #find_path(GLUT_INCLUDE_DIR glut.h PATHS ${MINGWDIR}/include/GL)
    find_library(GLUT_LIBRARIES libfreeglut.a PATHS ${MINGWDIR}/lib)

elseif(OPTION_STATIC)

find_file(HAVE_GL_FREEGLUT_H GL/freeglut.h)

find_path(GLUT_INCLUDE_DIR GL/freeglut.h)

find_library(GLUT_LIBRARIES libglut.a)

else()
    find_file(HAVE_GL_GLUT_H GL/glut.h)
    find_file(HAVE_GLUT_GLUT_H GLUT/glut.h)
    include(FindGLUT)
    #find_file(HAVE_GL_FREEGLUT_H GL/freeglut.h)
    #find_path(GLUT_INCLUDE_DIR GL/freeglut.h)
    #find_library(GLUT_LIBRARIES NAMES libglut)
endif()

if(GLUT_FOUND)
    set(GLUT_FOUND TRUE)
    message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'")
elseif(GLUT_INCLUDE_DIR AND GLUT_LIBRARIES)
    set(GLUT_FOUND TRUE)
    message(STATUS "Glut found: '${GLUT_INCLUDE_DIR}', '${GLUT_LIBRARIES}'")
else()
    set(GLUT_FOUND FALSE)
    message(FATAL_ERROR "Glut not found.  Building without OpenGL is possible.")
endif()

set(HAVE_OPENGL TRUE)
include_directories(${GLUT_INCLUDE_DIR})
list(APPEND DEP_LIBS ${GLUT_LIBRARIES})

endif()

####### Build with LibX11 (only required for static build on Mac) ##########

if(OPTION_STATIC AND OPTION_USE_OPENGL AND HAVE_OPENGL)

FIND_PACKAGE(X11)

if(X11_FOUND)

message(STATUS "Found X11: '${X11_INCLUDE_DIR}', '${X11_LIBRARIES}'")

else()

message(FATAL_ERROR "X11 not found")

endif()

include_directories(${X11_INCLUDE_DIR})

list(APPEND DEP_LIBS ${X11_LIBRARIES})

endif()

####### Option: Build with LibTiff ##########

if(OPTION_USE_LIBTIFF) if(NOT HAVE_OPENGL) message(WARNING "LibTiff won't be used because build does not include OpenGL.") endif()

if(OPTION_MINGW)
    find_path(TIFF_INCLUDE_DIR tiff.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH)
    find_library(TIFF_LIBRARY libtiff.a PATHS ${MINGWDIR}/lib NO_DEFAULT_PATH)
elseif(OPTION_STATIC)
    find_path(TIFF_INCLUDE_DIR tiff.h)
    find_library(TIFF_LIBRARY libtiff.a)
else()
    FIND_PACKAGE(TIFF)
endif()

if(TIFF_INCLUDE_DIR AND TIFF_LIBRARY)
    set(HAVE_LIBTIFF TRUE)
    message(STATUS "Found Libtiff: '${TIFF_INCLUDE_DIR}', '${TIFF_LIBRARY}'")
else()
    set(HAVE_LIBTIFF FALSE)
    message(FATAL_ERROR "Libtiff not found")
endif()

include_directories(${TIFF_INCLUDE_DIR})
list(APPEND DEP_LIBS ${TIFF_LIBRARY})

endif(OPTION_USE_LIBTIFF)

####### Option: Build with Zlib ##########

if(OPTION_USE_ZLIB) if(OPTION_MINGW) find_path(ZLIB_INCLUDE_DIRS zlib.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH) find_library(ZLIB_LIBRARIES libz.a PATHS ${MINGWDIR}/lib NO_DEFAULT_PATH) elseif(OPTION_STATIC) find_path(ZLIB_INCLUDE_DIRS zlib.h) find_library(ZLIB_LIBRARIES libz.a) else() include(FindZlib) endif()

if(ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARIES)
    set(HAVE_ZLIB TRUE)
    message(STATUS "Found Zlib: '${ZLIB_INCLUDE_DIRS}', '${ZLIB_LIBRARIES}'")
else()
    set(HAVE_ZLIB FALSE)
    message(FATAL_ERROR "Zlib not found")
endif()

include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND DEP_LIBS ${ZLIB_LIBRARIES})

endif(OPTION_USE_ZLIB)

####### Option: Build with iconv ##########

if(OPTION_USE_ICONV) if(OPTION_MINGW) find_path(ICONV_INCLUDE_DIRS iconv.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH) find_library(ICONV_LIBRARIES libiconv.a PATHS ${MINGWDIR}/lib NO_DEFAULT_PATH) elseif(OPTION_STATIC) find_path(ICONV_INCLUDE_DIRS iconv.h) find_library(ICONV_LIBRARIES libiconv.a) else() find_path(ICONV_INCLUDE_DIRS iconv.h) find_library(ICONV_LIBRARIES NAMES iconv) endif()

if(ICONV_INCLUDE_DIRS AND ICONV_LIBRARIES)
    set(HAVE_ICONV TRUE)
    message(STATUS "Found Libiconv: '${ICONV_INCLUDE_DIRS}', '${ICONV_LIBRARIES}'")
else()
    set(HAVE_ICONV FALSE)
    message(FATAL_ERROR "Libiconv not found")
endif()

include_directories(${ICONV_INCLUDE_DIRS})
list(APPEND DEP_LIBS ${ICONV_LIBRARIES})

endif(OPTION_USE_ICONV)

####### Option: Build with VTK ##########

if(OPTION_VTK) add_definitions(-DHAVE_VTK) find_package(VTK REQUIRED) if(VTK_FOUND) message(STATUS "Found VTK: '${VTK_INCLUDE_DIRS}'") else() message(FATAL_ERROR "VTK not found") endif()

include_directories(${VTK_INCLUDE_DIRS})

list(APPEND SRC_FILES source/vtk/vtkwrapper.cpp)
list(APPEND HEADER_FILES source/vtk/vtkwrapper.h)
add_definitions("-Wno-deprecated")
list(APPEND DEP_LIBS ${VTK_LIBRARIES})

endif(OPTION_VTK)

####### Option: Build with NextSubvolume ##########

if(OPTION_NSV)

add_subdirectory(source/NextSubVolume)

#list(APPEND DEP_LIBS nsv)
#include_directories(source/NextSubVolume)
#include_directories(${VTK_INCLUDE_DIRS})

if(OPTION_MINGW)
    find_path(SIGNAL_H_DIR signal.h PATHS ${MINGWDIR}/include NO_DEFAULT_PATH)
    if(SIGNAL_H_DIR)
        message(STATUS "Found signal.h: '${SIGNAL_H_DIR}'")
    else()
        message(FATAL_ERROR "signal.h not found")
    endif()
    include_directories(${SIGNAL_H_DIR})
endif()

set(Boost_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/NextSubVolume/boost_include)
include_directories(SYSTEM ${Boost_INCLUDE_DIR})

list(APPEND SRC_FILES 
                source/NextSubVolume/StructuredGrid.cpp
                source/NextSubVolume/Species.cpp
                source/NextSubVolume/ReactionEquation.cpp
                source/NextSubVolume/NextSubvolumeMethod.cpp
                source/NextSubVolume/Kairos.cpp
                source/NextSubVolume/Io.cpp
                source/NextSubVolume/Geometry.cpp
                source/NextSubVolume/nsvc.cpp
                )
list(APPEND HEADER_FILES 
                source/NextSubVolume/Vector.h
                source/NextSubVolume/StructuredGrid.h
                source/NextSubVolume/Species.h
                source/NextSubVolume/ReactionEquation.h
                source/NextSubVolume/NextSubvolumeMethod.h
                source/NextSubVolume/Log.h
                source/NextSubVolume/Kairos.h
                source/NextSubVolume/Io.h
                source/NextSubVolume/Geometry.h
                source/NextSubVolume/Constants.h
                source/NextSubVolume/nsvc.h
                )

add_definitions("-Wno-deprecated")

endif(OPTION_NSV)

####### Option: Build with PDE ##########

####### Targets ##########

if(OPTION_TARGET_SMOLDYN) add_executable(smoldyn ${SRC_FILES} ${MAIN_FILES} ${HEADER_FILES}) target_link_libraries(smoldyn ${DEP_LIBS}) endif()

if(OPTION_TARGET_LIBSMOLDYN) add_library(smoldyn_shared SHARED ${SRC_FILES} ${HEADER_FILES}) add_library(smoldyn_static STATIC ${SRC_FILES} ${HEADER_FILES}) target_link_libraries(smoldyn_shared ${DEP_LIBS}) target_link_libraries(smoldyn_static ${DEP_LIBS}) if(APPLE) SET_TARGET_PROPERTIES(smoldyn_shared PROPERTIES LINK_FLAGS "-framework Glut -framework OpenGL") endif(APPLE) endif(OPTION_TARGET_LIBSMOLDYN)

########## install ###########

if(NOT OPTION_MINGW)

if(OPTION_TARGET_SMOLDYN)
    install(TARGETS smoldyn RUNTIME DESTINATION bin)
endif()

if(OPTION_TARGET_LIBSMOLDYN)
    install(TARGETS smoldyn_shared LIBRARY DESTINATION lib)
    install(TARGETS smoldyn_static ARCHIVE DESTINATION lib)
    install(FILES source/Smoldyn/libsmoldyn.h source/Smoldyn/smoldyn.h ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h DESTINATION include)
endif(OPTION_TARGET_LIBSMOLDYN)

endif(NOT OPTION_MINGW)

########## configure file #########

configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/source/smoldynconfigure.h.in ${CMAKE_CURRENT_BINARY_DIR}/smoldynconfigure.h )

########## package #########

include(CPack)

Seynen commented 6 years ago

Hello Steve,

Can you try and replace GLUT::GLUT with ${GLUT_LIBRARIES} in the target_link_libraries statement? I don't have a mac so I cannot test it myself.
Sorry, documentation is still lacking, it is on the todo-list! If you haven't done already, take a look at the website (http://gfrd.org). I'll forward your other questions to Pieter Rein, he should be able to answer about ecell history.

Regards, Marco

ssandrews commented 6 years ago

Hi Marco,

Thanks for the help with this. The suggestion you gave was probably an improvement, but it didn't fix the problem. I did a little searching and finally found the problem, although not the solution yet. The issue is that the version of GLUT that comes with Macs doesn't have some of the functions that the gfrdVisualizer is using. Those functions are:

glutBitmapHeight glutBitmapString glutFullScreenToggle glutLeaveMainLoop glutMouseWheelFunc glutSetOption glutSolidCylinder glutWireCylinder

I'm guessing that the options are to either remove these dependencies from the visualizer code or to require Mac users to get freeglut or some other glut library. I have freeglut installed somewhere, but I haven't yet tried to get it to link. Actually, I tried simply using find_package(FREEGLUT), and CMake returned lots of complaints. I didn't try pursuing this further.

Anyhow, I don't actually need the visualizer for my work, so I'm not eager to spend too much time debugging its build system at the moment. However, I'll be happy to continue trying things if you'd like. (I'm quite used to this problem; I want Smoldyn to work on all platforms, but I can only really test it on a Mac.)

I'll e-mail later with more questions...

-Steve

On Tue, Oct 24, 2017 at 11:54 PM, Seynen notifications@github.com wrote:

Hello Steve,

Can you try and replace GLUT::GLUT with ${GLUT_LIBRARIES} in the target_link_libraries statement? I don't have a mac so I cannot test it myself. Sorry, documentation is still lacking, it is on the todo-list! If you haven't done already, take a look at the website (http://gfrd.org). I'll forward your other questions to Pieter Rein, he should be able to answer about ecell history.

Regards, Marco

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gfrd/modern_egfrd/issues/2#issuecomment-339232633, or mute the thread https://github.com/notifications/unsubscribe-auth/AfgjwQUkuzxuOIiGuj3RfYwkZRa-U9Ziks5svtsOgaJpZM4QDa1n .

nilsbecker commented 5 years ago

hi, i think i am having the same problem.

i can successfully build egfrd on os x high sierra, but building gfrdVisualizer fails with an undefined symbol glutBitmapHeight. from the path info this appears to be caused by the linker trying to use the system version of glut which does not contain that symbol.

i have freeglut installed via homebrew; it's here:

/usr/local/Cellar/freeglut/3.0.0/include/GL/ (4 files)
/usr/local/Cellar/freeglut/3.0.0/lib/libglut.3.10.0.dylib
/usr/local/Cellar/freeglut/3.0.0/lib/pkgconfig/freeglut.pc
/usr/local/Cellar/freeglut/3.0.0/lib/ (3 other files)

can i tell cmake to use that instead of the system one?

nilsbecker commented 5 years ago

this may also be helpful ( the homebrew install script for freeglut):

https://github.com/Homebrew/homebrew-core/blob/master/Formula/freeglut.rb

nilsbecker commented 5 years ago

mentioning @Seynen just in case this is necessary to send a notification

Seynen commented 5 years ago

Hi Nils, I got your messages (no need to tag).

I don't have a mac (somebody sponsor?). Can you find the right commands for find_package and target_link_libraries? When it works I can put a conditional entry in the CMake file for mac-users.

nilsbecker commented 5 years ago

i can try but i would need a little help -- i am not familiar with how cmake works. what file do i need to change and how can i find out if the right version of freeglut is linked?

Seynen commented 5 years ago

try find and replace text 'GLUT' with 'FREEGLUT' in file: modern_egfrd/src/gfrdVisualizer/CMakeLists.txt (4 occurrences).

nilsbecker commented 5 years ago

ok, thanks. i replaced 4 occurrences in the indicated file. i get an error:

cmake --verbose -DCMAKE_BUILD_TYPE=Release  ..
CMake Warning at src/gfrdVisualizer/CMakeLists.txt:2 (find_package):
  By not providing "FindFREEGLUT.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "FREEGLUT",
  but CMake did not find one.

  Could not find a package configuration file provided by "FREEGLUT" with any
  of the following names:

    FREEGLUTConfig.cmake
    freeglut-config.cmake

  Add the installation prefix of "FREEGLUT" to CMAKE_PREFIX_PATH or set
  "FREEGLUT_DIR" to a directory containing one of the above files.  If
  "FREEGLUT" provides a separate development package or SDK, be sure it has
  been installed.

WARNING,target gfrdVisualizer skipped

i suspect that freeglut describes itself as glut. but i could try to find the path of where it is installed and add that to the CMAKE_PREFIX_PATH. is that an environment variable?

nilsbecker commented 5 years ago

i tried this:

pkg-config --print-errors --print-provides  freeglut
freeglut = 3.0.0
nilsbecker commented 5 years ago

so there is a pkg-config package of this name. the command fails when searching just for glut instead of freeglut

nilsbecker commented 5 years ago

some more info on the freeglut installation:

Linking /usr/local/Cellar/freeglut/3.0.0...
ln -s ../Cellar/freeglut/3.0.0/include/GL GL
ln -s ../Cellar/freeglut/3.0.0/lib/libglut.3.10.0.dylib libglut.3.10.0.dylib
ln -s ../Cellar/freeglut/3.0.0/lib/libglut.3.dylib libglut.3.dylib
ln -s ../Cellar/freeglut/3.0.0/lib/libglut.a libglut.a
ln -s ../Cellar/freeglut/3.0.0/lib/libglut.dylib libglut.dylib
ln -s ../../Cellar/freeglut/3.0.0/lib/pkgconfig/freeglut.pc freeglut.pc
6 symlinks created

the symlinks are then in /usr/local/lib/

nilsbecker commented 5 years ago

(i edited the cmake output, since i had cut off part of it by mistake)

nilsbecker commented 5 years ago

the package description files for cmake with the names FindXXX.cmake are in /usr/local/share/cmake/Modules/. indeed, there i find FindGLUT.cmake but not FindFreeGLUT.cmake

nilsbecker commented 5 years ago

there is also this: http://blog.alexbeutel.com/285/cmake-opengl-and-glx-on-os-x/ from the bowels of the internet. there they talk about choosing the right glut from the apple built-in (cocoa) or the optional X11 locations. here we want a third option, freeglut. maybe that post could be adapted to include the right directory for freeglut?

nilsbecker commented 5 years ago

this is still not working for me. maybe it would make sense to schedule a time slot for trying to fix this in a few quick iterations? ideally, complete os x installation instructions could result from that.

Seynen commented 5 years ago

Yes, please do. It would be great if you can fix this for all Mac users.

Seynen commented 5 years ago

Having you OS saying it supports a library but gives you half the implementation is a bit like asking a friend if can fly a plane, followed by a in-air discussion whether or not the statement includes landing it!

nilsbecker commented 5 years ago

well, to be fair, i think freeGLUT defines some extra functions which are not in the original GLUT, which is what os x includes. that's why it is necessary to install freeglut via homebrew in the first place.

my problem is: i don't know cmake. so if you have suggestions of what to try i could try them out, interactively. would you have time for that? i could start now, or possibly in the afternoon

Seynen commented 5 years ago

I see, my mistake. The missing functions are not part of GLUT but of freeGlut. Still weird that it accepts #include <GL/freeglut.h> which should have been #include <GL/glut.h> if os-x is so picky about it.

nilsbecker commented 5 years ago

do you have a suggestion that i could try? or do you need some other info about my installation?

Seynen commented 5 years ago

can you call me at Amolf?

nilsbecker commented 5 years ago

yes, would sometime in the afternoon work? let's say 3pm?

Seynen commented 5 years ago

oke

Seynen commented 5 years ago

can you try, adding the following lines at the top of file src/gfrdVisualizer/CMakeLists.txt

if (APPLE) set(GLUT_ROOT_PATH /usr/local/Cellar/freeglut/3.0.0/) endif()

Seynen commented 5 years ago

with line-feeds: if / set / endif

nilsbecker commented 5 years ago

ok, i tried. i am not sure if i did enough to clear the cmake cache and really start a fresh build. what do i need to do to reset cmake?

nilsbecker commented 5 years ago

i have this now:

if (APPLE) 
    set(GLUT_ROOT_PATH /usr/local/Cellar/freeglut/3.0.0/)
endif()

find_package(OpenGL)
find_package(GLUT)

or should i use find_package(FREEGLUT)?

nilsbecker commented 5 years ago

i have googled and apparently it's enough to delete the file CMakeCache.txt in build/. with the present CMakeLists.txt i get

cmake --verbose -DCMAKE_BUILD_TYPE=Release ..
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found GSL: /usr/local/Cellar/gsl/2.5/include (found version "2.5")
-- Checking support for std::make_unique
-- Checking support for std::make_unique - not supported
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Found GLUT: /System/Library/Frameworks/GLUT.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/nbecker/Code/github/modern_egfrd/build
nilsbecker commented 5 years ago

so that does not seem to work, since it's still using the system GLUT

Seynen commented 5 years ago

can you locate a file 'somewhere' on your system called: 'FindGLUT.cmake'? that file contains what CMake does to find GLUT.

nilsbecker commented 5 years ago

ok. i found it. it's in /usr/local/Cellar/cmake/3.12.4/share/cmake/Modules/. here the contents:

# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

#.rst:
# FindGLUT
# --------
#
# try to find glut library and include files.
#
# IMPORTED Targets
# ^^^^^^^^^^^^^^^^
#
# This module defines the :prop_tgt:`IMPORTED` targets:
#
# ``GLUT::GLUT``
#  Defined if the system has GLUT.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module sets the following variables:
#
# ::
#
#   GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
#   GLUT_LIBRARIES, the libraries to link against
#   GLUT_FOUND, If false, do not try to use GLUT.
#
# Also defined, but not for general use are:
#
# ::
#
#   GLUT_glut_LIBRARY = the full path to the glut library.
#   GLUT_Xmu_LIBRARY  = the full path to the Xmu library.
#   GLUT_Xi_LIBRARY   = the full path to the Xi Library.

if (WIN32)
  find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h
    PATHS  ${GLUT_ROOT_PATH}/include )
  find_library( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
    PATHS
    ${OPENGL_LIBRARY_DIR}
    ${GLUT_ROOT_PATH}/Release
    )
else ()

  if (APPLE)
    find_path(GLUT_INCLUDE_DIR glut.h ${OPENGL_LIBRARY_DIR})
    find_library(GLUT_glut_LIBRARY GLUT DOC "GLUT library for OSX")
    find_library(GLUT_cocoa_LIBRARY Cocoa DOC "Cocoa framework for OSX")

    if(GLUT_cocoa_LIBRARY AND NOT TARGET GLUT::Cocoa)
      add_library(GLUT::Cocoa UNKNOWN IMPORTED)
      # Cocoa should always be a Framework, but we check to make sure.
      if(GLUT_cocoa_LIBRARY MATCHES "/([^/]+)\\.framework$")
        set_target_properties(GLUT::Cocoa PROPERTIES
          IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}/${CMAKE_MATCH_1}")
      else()
        set_target_properties(GLUT::Cocoa PROPERTIES
          IMPORTED_LOCATION "${GLUT_cocoa_LIBRARY}")
      endif()
    endif()
  else ()

    if (BEOS)

      set(_GLUT_INC_DIR /boot/develop/headers/os/opengl)
      set(_GLUT_glut_LIB_DIR /boot/develop/lib/x86)

    else()

      find_library( GLUT_Xi_LIBRARY Xi
        /usr/openwin/lib
        )

      find_library( GLUT_Xmu_LIBRARY Xmu
        /usr/openwin/lib
        )

      if(GLUT_Xi_LIBRARY AND NOT TARGET GLUT::Xi)
        add_library(GLUT::Xi UNKNOWN IMPORTED)
        set_target_properties(GLUT::Xi PROPERTIES
          IMPORTED_LOCATION "${GLUT_Xi_LIBRARY}")
      endif()

      if(GLUT_Xmu_LIBRARY AND NOT TARGET GLUT::Xmu)
        add_library(GLUT::Xmu UNKNOWN IMPORTED)
        set_target_properties(GLUT::Xmu PROPERTIES
          IMPORTED_LOCATION "${GLUT_Xmu_LIBRARY}")
      endif()

    endif ()

    find_path( GLUT_INCLUDE_DIR GL/glut.h
      /usr/include/GL
      /usr/openwin/share/include
      /usr/openwin/include
      /opt/graphics/OpenGL/include
      /opt/graphics/OpenGL/contrib/libglut
      ${_GLUT_INC_DIR}
      )

    find_library( GLUT_glut_LIBRARY glut
      /usr/openwin/lib
      ${_GLUT_glut_LIB_DIR}
      )

    unset(_GLUT_INC_DIR)
    unset(_GLUT_glut_LIB_DIR)

  endif ()

endif ()

include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)

if (GLUT_FOUND)
  # Is -lXi and -lXmu required on all platforms that have it?
  # If not, we need some way to figure out what platform we are on.
  set( GLUT_LIBRARIES
    ${GLUT_glut_LIBRARY}
    )
  foreach(v GLUT_Xmu_LIBRARY GLUT_Xi_LIBRARY GLUT_cocoa_LIBRARY)
    if(${v})
      list(APPEND GLUT_LIBRARIES ${${v}})
    endif()
  endforeach()

  if(NOT TARGET GLUT::GLUT)
    add_library(GLUT::GLUT UNKNOWN IMPORTED)
    set_target_properties(GLUT::GLUT PROPERTIES
      INTERFACE_INCLUDE_DIRECTORIES "${GLUT_INCLUDE_DIR}")
    if(GLUT_glut_LIBRARY MATCHES "/([^/]+)\\.framework$")
      set_target_properties(GLUT::GLUT PROPERTIES
        IMPORTED_LOCATION "${GLUT_glut_LIBRARY}/${CMAKE_MATCH_1}")
    else()
      set_target_properties(GLUT::GLUT PROPERTIES
        IMPORTED_LOCATION "${GLUT_glut_LIBRARY}")
    endif()

    if(TARGET GLUT::Xmu)
      set_property(TARGET GLUT::GLUT APPEND
        PROPERTY INTERFACE_LINK_LIBRARIES GLUT::Xmu)
    endif()

    if(TARGET GLUT::Xi)
      set_property(TARGET GLUT::GLUT APPEND
        PROPERTY INTERFACE_LINK_LIBRARIES GLUT::Xi)
    endif()

    if(TARGET GLUT::Cocoa)
      set_property(TARGET GLUT::GLUT APPEND
        PROPERTY INTERFACE_LINK_LIBRARIES GLUT::Cocoa)
    endif()
  endif()

  #The following deprecated settings are for backwards compatibility with CMake1.4
  set (GLUT_LIBRARY ${GLUT_LIBRARIES})
  set (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
endif()

mark_as_advanced(
  GLUT_INCLUDE_DIR
  GLUT_glut_LIBRARY
  GLUT_Xmu_LIBRARY
  GLUT_Xi_LIBRARY
  )
nilsbecker commented 5 years ago

as far as i gathered, both os x base system and the XQuartz, which is the optional X window server, include a version of GLUT. both of these are old and are not freeGLUT.

should i call?

Seynen commented 5 years ago

in this file, can you replace the first two lines after if (APPLE) with: ` find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h PATHS ${GLUT_ROOT_PATH}/include )

find_library( GLUT_glut_LIBRARY NAMES glut freeglut PATHS  ${GLUT_ROOT_PATH}/lib )

`

than clear and build again... with the set(GLUT_ROOT_PATH..) still in the file (from 25 min ago).

nilsbecker commented 5 years ago

hmm. it looks like this now:

  if (APPLE)
    #find_path(GLUT_INCLUDE_DIR glut.h ${OPENGL_LIBRARY_DIR})
    #find_library(GLUT_glut_LIBRARY GLUT DOC "GLUT library for OSX")
        find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h PATHS ${GLUT_ROOT_PATH}/include )
        find_library( GLUT_glut_LIBRARY NAMES glut freeglut PATHS  ${GLUT_ROOT_PATH}/lib )
    find_library(GLUT_cocoa_LIBRARY Cocoa DOC "Cocoa framework for OSX")
...

this file is the one that appears in CMakeFiles/Makefile.cmake in modern_gfrd

nevertheless, after i delete the cache file,

bqdyn245_127:build nbecker$ rm CMakeCache.txt
bqdyn245_127:build nbecker$ cmake --verbose -DCMAKE_BUILD_TYPE=Release ..
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found GSL: /usr/local/Cellar/gsl/2.5/include (found version "2.5")
-- Checking support for std::make_unique
-- Checking support for std::make_unique - not supported
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Found GLUT: /System/Library/Frameworks/glut.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/nbecker/Code/github/modern_egfrd/build
nilsbecker commented 5 years ago

maybe GLUT_cocoa_LIBRARY needs to be overridden/removed too?

nilsbecker commented 5 years ago

commenting out the cocoa line changed nothing.

however, i checked that renaming the FindGLUT.cmake file makes the egfrd cmake configuration stop. so it is the correct file that specifies how GLUT is found

nilsbecker commented 5 years ago

is it possible to print the path variables that cmake determined? e.g. GLUT_INCLUDE_DIR?

Seynen commented 5 years ago

try using message

nilsbecker commented 5 years ago

i tried but i just get back GLUT_INCLUDE_DIR . how do i properly refer to the value of a variable? $ in front does not work