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

Build guide needs to be improved. #22

Open
anikom15 opened this issue May 7, 2023 · 0 comments
Open

Build guide needs to be improved. #22

anikom15 opened this issue May 7, 2023 · 0 comments

Comments

@anikom15
Copy link

anikom15 commented May 7, 2023

I attempted to build the latest code on Windows by following the build guide. This did not work. It wasn't exactly clear what commands I needed to use to get cmake to work. This is what I tried:

$ cmake -B build -S src -D CMAKE_TOOLCHAIN_FILE=./cmake/flags-gcc-x86_64.cmake --preset regular
CMake Error: Could not read presets from C:/msys64/home/Westley/86Box/src: File not found

I then tried this:

$ cmake --preset regular -D CMAKE_TOOLCHAIN_FILE=./cmake/flags-gcc-x86_64.cmake
Preset CMake variables:

  CMAKE_BUILD_TYPE="Release"
  CMAKE_EXPORT_COMPILE_COMMANDS:BOOL="TRUE"
  CMAKE_INSTALL_PREFIX="C:/msys64/home/Westley/86Box/build/artifacts"
  DEV_BRANCH="OFF"
  NEW_DYNAREC="OFF"
  QT="ON"

-- The C compiler identification is GNU 13.1.0
-- The CXX compiler identification is GNU 13.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/ucrt64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/msys64/ucrt64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Freetype: C:/msys64/ucrt64/lib/libfreetype.a (found version "2.13.0")
-- Found ZLIB: C:/msys64/ucrt64/lib/libz.a (found version "1.2.13")
-- Found PNG: C:/msys64/ucrt64/lib/libpng.a (found version "1.6.39")
-- Found OpenAL: C:/msys64/ucrt64/lib/libopenal.a
-- Found PkgConfig: C:/msys64/ucrt64/bin/pkg-config.exe (found version "1.8.0")
-- Checking for module 'rtmidi'
--   Found rtmidi, version 5.0.0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (3.7s)
-- Generating done (0.2s)
-- Build files have been written to: C:/msys64/home/Westley/86Box/build/regular

That seemed to work okay. I then did this:

$ cmake -B build -S src
-- Building for: Ninja
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 13.1.0
-- The CXX compiler identification is GNU 13.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/ucrt64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/msys64/ucrt64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Freetype: C:/msys64/ucrt64/lib/libfreetype.dll.a (found version "2.13.0")
-- Found ZLIB: C:/msys64/ucrt64/lib/libz.dll.a (found version "1.2.13")
-- Found PNG: C:/msys64/ucrt64/lib/libpng.dll.a (found version "1.6.39")
CMake Error at cpu/CMakeLists.txt:37 (target_link_libraries):
  Attempt to add link library "softfloat" to target "86Box" which is not
  built in this directory.

  This is allowed only when policy CMP0079 is set to NEW.


CMake Error at disk/CMakeLists.txt:25 (target_link_libraries):
  Attempt to add link library "minivhd" to target "86Box" which is not built
  in this directory.

  This is allowed only when policy CMP0079 is set to NEW.


CMake Error at network/CMakeLists.txt:32 (target_link_libraries):
  Attempt to add link library "slirp" to target "86Box" which is not built in
  this directory.

  This is allowed only when policy CMP0079 is set to NEW.


CMake Error at network/CMakeLists.txt:40 (target_link_libraries):
  Attempt to add link library "ws2_32" to target "86Box" which is not built
  in this directory.

  This is allowed only when policy CMP0079 is set to NEW.


CMake Error at sound/CMakeLists.txt:116 (target_link_libraries):
  Attempt to add link library "ymfm" to target "86Box" which is not built in
  this directory.

  This is allowed only when policy CMP0079 is set to NEW.


CMake Error at sound/CMakeLists.txt:128 (target_link_libraries):
  Attempt to add link library "resid-fp" to target "86Box" which is not built
  in this directory.

  This is allowed only when policy CMP0079 is set to NEW.


CMake Error at win/CMakeLists.txt:61 (target_link_libraries):
  Attempt to add link library "advapi32" to target "86Box" which is not built
  in this directory.

  This is allowed only when policy CMP0079 is set to NEW.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.26)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

I am not very familiar with cmake. I have mostly a make/autotools background.

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

No branches or pull requests

1 participant