Open xcom169 opened 4 years ago
I think FIND SDL PACKAGE is not working in CMAKE
I know I'm a month late but changing the cmake file to contain this line:
target_link_libraries(smbc SDL2)
Worked for me on Manjaro Linux
Both ${SDL2_LIBRARY}
and ${SDL2_LIBRARIES}
are empty, seems bug of the new version CMake (for me is 3.17.1 now).
I'm in Manjaro too, I get this error while executing cmake ..
in build directory:
CMake Error at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Boost (missing: Boost_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.19/Modules/FindBoost.cmake:2208 (find_package_handle_standard_args)
CMakeLists.txt:22 (find_package)
-- Configuring incomplete, errors occurred!
Can confirm this is also a issue for me on the Raspberry pi 4
By editing CMakeLists.txt and replacing target_link_libraries(smbc ${SDL2_LIBRARY} ${SDL2_LIBRARIES})
with target_link_libraries(smbc SDL2)
it will compile, can the CMakeLists.txt file be updated place?
Manjaro can't compile this because of missing SDL?
ain.cpp:(.text+0x58c): undefined reference to
SDL_GetTicks' /usr/bin/ld: Main.cpp:(.text+0x5b8): undefined reference to
SDL_PollEvent' /usr/bin/ld: Main.cpp:(.text+0x604): undefined reference toSDL_GetKeyboardState' /usr/bin/ld: Main.cpp:(.text+0x7d6): undefined reference to
SDL_SetWindowFullscreen' /usr/bin/ld: Main.cpp:(.text+0x81b): undefined reference toSDL_UpdateTexture' /usr/bin/ld: Main.cpp:(.text+0x82a): undefined reference to
SDL_RenderClear' /usr/bin/ld: Main.cpp:(.text+0x843): undefined reference toSDL_RenderSetLogicalSize' /usr/bin/ld: Main.cpp:(.text+0x863): undefined reference to
SDL_RenderCopy' /usr/bin/ld: Main.cpp:(.text+0x885): undefined reference toSDL_RenderSetLogicalSize' /usr/bin/ld: Main.cpp:(.text+0x8a5): undefined reference to
SDL_RenderCopy' /usr/bin/ld: Main.cpp:(.text+0x8b4): undefined reference toSDL_RenderPresent' /usr/bin/ld: Main.cpp:(.text+0x8b9): undefined reference to
SDL_GetTicks' /usr/bin/ld: Main.cpp:(.text+0x922): undefined reference toSDL_Delay' /usr/bin/ld: CMakeFiles/smbc.dir/source/Emulation/APU.cpp.o: in function
APU::stepFrame()': APU.cpp:(.text+0x3f4): undefined reference toSDL_LockAudio' /usr/bin/ld: APU.cpp:(.text+0x4f1): undefined reference to
SDL_UnlockAudio' /usr/bin/ld: CMakeFiles/smbc.dir/source/Util/Video.cpp.o: in functiongenerateScanlineTexture(SDL_Renderer*)': Video.cpp:(.text+0x3f2): undefined reference to
SDL_CreateTexture' /usr/bin/ld: Video.cpp:(.text+0x4fe): undefined reference toSDL_SetTextureBlendMode' /usr/bin/ld: Video.cpp:(.text+0x518): undefined reference to
SDL_UpdateTexture' collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/smbc.dir/build.make:219: smbc] Error 1 make[1]: [CMakeFiles/Makefile2:96: CMakeFiles/smbc.dir/all] Error 2 make: *** [Makefile:84: all] Error 2