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 issues - how to get Steam library? #1

Open
ericonr opened this issue Sep 23, 2020 · 5 comments
Open

Build issues - how to get Steam library? #1

ericonr opened this issue Sep 23, 2020 · 5 comments

Comments

@ericonr
Copy link

ericonr commented Sep 23, 2020

Hi! Thanks for the awesome release!

I'm trying to build this game from source, but I've noticed a few issues.

In HPL2:

  • dependencies.zip isn't unzipped automatically by the build system, which means it errors out when doing add_subdirectory(../dependencies/OALWrapper OALWrapper). Just unzipping into a dependencies folder fixes this.
  • tests folder doesn't exist, so add_subdirectory(../tests tests) also fails

It would be nice to have a dependency list, too. I have used at least glu-devel and MesaLib-devel.

My main issue, however, is with the steam library:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
STEAM_LIBRARY
    linked by target "AmnesiaSteam" in directory /builddir/AmnesiaTheDarkDescent-ea45a1e253aa1a50aa89654f56f352dbf13b0e0f/amnesia/src/game

How would I get one, if that's even possible? Would perhaps something like https://gitlab.com/Mr_Goldberg/goldberg_emulator be enough?

@VHSCODE
Copy link

VHSCODE commented Sep 23, 2020

In my case i just created a new folder and set the variable to the path, however, it seems that the tests folder is also missing.

@ericonr
Copy link
Author

ericonr commented Sep 23, 2020

@VHSCODE sorry, I should have mentioned. Removing the tests line allows it to go ahead. And thanks for the suggestion.

@VHSCODE
Copy link

VHSCODE commented Sep 23, 2020

Btw, somebody just fixed the linux build files #2

@ericonr
Copy link
Author

ericonr commented Sep 23, 2020

So, as an addition to the dependencies, it requires perl. And thanks!

@darmon77
Copy link

The steam library you can disable without problems by deleting or commenting.. src/game/CMakeLists.txt

add_executable(AmnesiaSteam MACOSX_BUNDLE EXCLUDE_FROM_ALL
    ${full_sources}
)
find_library(STEAM_LIBRARY steam_api PATHS ${DEP_LIB_DIR} PATH_SUFFIXES lib NO_DEFAULT_PATH)
target_link_libraries(AmnesiaSteam HPL2 ${STEAM_LIBRARY})
set_target_properties(AmnesiaSteam PROPERTIES
	COMPILE_DEFINITIONS "${compile_defs};USE_STEAM"
    MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Game-Info.plist"
	MACOSX_BUNDLE_ICON_FILE "Lux.icns"
	MACOSX_BUNDLE_BUNDLE_VERSION ${VERSION}
	MACOSX_BUNDLE_SHORT_VERSION_STRING ${VERSION}
	MACOSX_BUNDLE_GUI_IDENTIFIER "com.frictionalgames.AmnesiaSteam"
    MACOSX_BUNDLE_BUNDLE_NAME "Amnesia: The Dark Descent"
)
if(LINUX)
	set_target_properties(AmnesiaSteam PROPERTIES
		LINK_FLAGS "-Wl,--allow-shlib-undefined" # Voodoo to ignore the libs that steam_api is linked to (will be resolved at runtime)
	)
endif()

The test folder can disable.. HPL2/core/CMakeLists.txt

add_subdirectory(../tests tests) delete or comment line
add_subdirectory(../tools tools)

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

3 participants