Skip to content

Commit

Permalink
minor fixes in GLUT/NDKmol.cpp and CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Jan 23, 2015
1 parent 12e4d0b commit 8064ab4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ if (NOT USE_ES2)
add_definitions(-DOPENGL_ES1)
endif()

add_definitions("-DINITIAL_PDB=\"${CMAKE_INSTALL_PREFIX}/share/ndkmol/initial.pdb\"")


add_executable(ndkmol
NDKmol/Atom.cpp NDKmol/PDBReader.cpp
NDKmol/CCP4Reader.cpp NDKmol/Protein.cpp
Expand All @@ -57,3 +60,4 @@ target_link_libraries(ndkmol ${GLUT_LIBRARY} ${OPENGL_LIBRARIES}
${ZLIB_LIBRARIES} ${EXTRA_LIBS})

install(TARGETS ndkmol DESTINATION bin)
install(FILES res/raw/initial.pdb DESTINATION share/ndkmol/)
8 changes: 4 additions & 4 deletions GLUT/NDKmol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ static void render_status_string() {
glRasterPos2i(5, 5);
for (const char* c = w.status_str; *c != '\0'; ++c)
glutBitmapCharacter(GLUT_BITMAP_9_BY_15, *c);
glEnable(GL_FOG);
if (w.use_fog)
glEnable(GL_FOG);
glEnable(GL_DEPTH_TEST);
glEnable(GL_LIGHTING);
}
Expand Down Expand Up @@ -725,9 +726,9 @@ static bool file_exists(const std::string& path) {

static std::string pdb_example_path(const char* argv0) {
#ifdef INITIAL_PDB
if file_exists(INITIAL_PDB)
if (file_exists(INITIAL_PDB))
return INITIAL_PDB;
#else
#endif
std::string dir = argv0;
size_t last_sep = dir.find_last_of("/\\");
if (last_sep == std::string::npos)
Expand All @@ -739,7 +740,6 @@ static std::string pdb_example_path(const char* argv0) {
if (file_exists(dir+"res/raw/initial.pdb"))
return dir+"res/raw/initial.pdb";
return "";
#endif
}

int main(int argc, char **argv) {
Expand Down

0 comments on commit 8064ab4

Please sign in to comment.