jkotlinski / lsdpack

Standalone LSDj recorder+player
GNU General Public License v2.0
116 stars 18 forks source link

cmake build problem on Debian #26

Closed pixjuan closed 2 years ago

pixjuan commented 2 years ago

I am using an up to date Debian 10 with cmake 3.13.4-1 and when I do a cmake . I get the following error:

-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:72 (install):
  install TARGETS given no RUNTIME DESTINATION for executable target
  "lsdpack".

-- Configuring incomplete, errors occurred!
See also "/home/user/code/gbdev/clockboy/lsdpack/CMakeFiles/CMakeOutput.log".

The log file is not very helpful, I'm including it just in case. CMakeOutput.log

The behaviour is the same if I specify an output directory.

I fixed this problem with the following patch:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0081489..1efb078 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,8 @@ add_executable(makegbs makegbs.cpp getopt.cpp)

 get_directory_property(TARGET_NAMES BUILDSYSTEM_TARGETS)

-install(TARGETS ${TARGET_NAMES})
+install(TARGETS ${TARGET_NAMES}
+   DESTINATION .)

 foreach(TARGET_NAME ${TARGET_NAMES})
     set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14)

This fixes the problem on my Debian, but I didn't test it on Windows or with earlier cmake versions.

jkotlinski commented 2 years ago

OK! Thank you for contributing!