Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake tries to install GLVis, although it build glvis #234

Closed
sshiraiwa opened this issue Jul 26, 2022 · 4 comments · Fixed by #239
Closed

CMake tries to install GLVis, although it build glvis #234

sshiraiwa opened this issue Jul 26, 2022 · 4 comments · Fixed by #239

Comments

@sshiraiwa
Copy link

I am trying to build GLvis. and seeing a strange error. I am using a linux box (Rocky8.6) and cnmake

I did call cmake, first
$ cmake .. -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_INSTALL_PREFIX=${TwoPiRoot} -DMFEM_DIR=${TwoPiRoot}/src/mfem/cmbuild_ser -DCMAKE_BUILD_TYPE="Release"

Then, "make -j" works fine, and it create glvis.
$ make -j

However, "make install" spits out the following error. It seems it is looking for GLVis instead of glvis.

Install the project...
/home/sshiraiw/twopi_roots/20220725/lib/python3.9/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /home/sshiraiw/twopi_roots/20220725/bin/glvis
-- Set runtime path of "/home/sshiraiw/twopi_roots/20220725/bin/glvis" to "/home/sshiraiw/twopi_roots/20220725/src/mfem/cmbuild_ser"
CMake Error at cmake_install.cmake:72 (file):
file INSTALL cannot find
"/home/sshiraiw/twopi_roots/20220725/src/glvis/cmbuild/GLVis": No such file
or directory.

Am I missing something?

@v-dobrev
Copy link
Member

It looks like we have some CMake commands related to building a MacOS app that are not properly guarded/skipped on other platforms:

glvis/CMakeLists.txt

Lines 319 to 339 in 0b8d554

set(GLVIS_APP_ICON ${CMAKE_CURRENT_SOURCE_DIR}/share/GLVis.icns)
set(GLVIS_APP_CREDITS ${CMAKE_CURRENT_SOURCE_DIR}/share/Credits.rtf)
set_source_files_properties(
${GLVIS_APP_ICON} ${GLVIS_APP_CREDITS}
PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources")
add_executable(app MACOSX_BUNDLE glvis.cpp ${GLVIS_APP_ICON} ${GLVIS_APP_CREDITS})
set_target_properties(app
PROPERTIES
EXCLUDE_FROM_ALL TRUE
OUTPUT_NAME GLVis
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/share/Info.cmake.plist.in)
target_link_libraries(app PRIVATE glvis glvis_logo)
install(TARGETS app
RUNTIME DESTINATION .
BUNDLE DESTINATION .)
install(CODE [[
include (BundleUtilities)
fixup_bundle("${CMAKE_INSTALL_PREFIX}/GLVis.app" "" "")
]] COMPONENT RUNTIME)

Maybe you can just comment out this part:

glvis/CMakeLists.txt

Lines 333 to 339 in 0b8d554

install(TARGETS app
RUNTIME DESTINATION .
BUNDLE DESTINATION .)
install(CODE [[
include (BundleUtilities)
fixup_bundle("${CMAKE_INSTALL_PREFIX}/GLVis.app" "" "")
]] COMPONENT RUNTIME)

We'll probably need to create a PR to fix this. Thanks for reporting the issue!

@yurivict
Copy link

Same here on FreeBSD.
The 4.2 release is broken.

@v-dobrev
Copy link
Member

Can you please try #239? It worked for me on my Linux desktop.

@yurivict
Copy link

I worked around the issue on FreeBSD by installing the executable manually. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants