CMake FetchContent SDL2 doesn't install
up vote
0
down vote
favorite
I'm trying to get SDL2 using CMake's FetchContent. The build is done successfuly but when I try to install I get the error:
[build] Makefile:117: recipe for target 'install' failed
[build] CMake Error at _deps/sdl2-build/cmake_install.cmake:198 (file):
[build] file INSTALL cannot find
[build] "/home/brian/Develop/onion-engine/build/_deps/sdl2-build/libSDL2.so".
[build] Call Stack (most recent call first):
[build] cmake_install.cmake:171 (include)
Here is the piece of code doing the Fetch:
FetchContent_Declare(
SDL2
URL ${SDL_URI}
URL_HASH MD5=${SDL_HASH}
)
FetchContent_GetProperties(SDL2)
if(NOT sdl2_POPULATED)
FetchContent_Populate(SDL2)
message(STATUS "Source dir: ${sdl2_SOURCE_DIR}")
message(STATUS "Binary dir: ${sdl2_BINARY_DIR}")
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
target_link_libraries(myCode SDL2)
endif()
FAQ:
- Why don't you use find_package(SDL2)?
I want to download the dependencies for the user.
c++ cmake sdl-2
add a comment |
up vote
0
down vote
favorite
I'm trying to get SDL2 using CMake's FetchContent. The build is done successfuly but when I try to install I get the error:
[build] Makefile:117: recipe for target 'install' failed
[build] CMake Error at _deps/sdl2-build/cmake_install.cmake:198 (file):
[build] file INSTALL cannot find
[build] "/home/brian/Develop/onion-engine/build/_deps/sdl2-build/libSDL2.so".
[build] Call Stack (most recent call first):
[build] cmake_install.cmake:171 (include)
Here is the piece of code doing the Fetch:
FetchContent_Declare(
SDL2
URL ${SDL_URI}
URL_HASH MD5=${SDL_HASH}
)
FetchContent_GetProperties(SDL2)
if(NOT sdl2_POPULATED)
FetchContent_Populate(SDL2)
message(STATUS "Source dir: ${sdl2_SOURCE_DIR}")
message(STATUS "Binary dir: ${sdl2_BINARY_DIR}")
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
target_link_libraries(myCode SDL2)
endif()
FAQ:
- Why don't you use find_package(SDL2)?
I want to download the dependencies for the user.
c++ cmake sdl-2
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to get SDL2 using CMake's FetchContent. The build is done successfuly but when I try to install I get the error:
[build] Makefile:117: recipe for target 'install' failed
[build] CMake Error at _deps/sdl2-build/cmake_install.cmake:198 (file):
[build] file INSTALL cannot find
[build] "/home/brian/Develop/onion-engine/build/_deps/sdl2-build/libSDL2.so".
[build] Call Stack (most recent call first):
[build] cmake_install.cmake:171 (include)
Here is the piece of code doing the Fetch:
FetchContent_Declare(
SDL2
URL ${SDL_URI}
URL_HASH MD5=${SDL_HASH}
)
FetchContent_GetProperties(SDL2)
if(NOT sdl2_POPULATED)
FetchContent_Populate(SDL2)
message(STATUS "Source dir: ${sdl2_SOURCE_DIR}")
message(STATUS "Binary dir: ${sdl2_BINARY_DIR}")
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
target_link_libraries(myCode SDL2)
endif()
FAQ:
- Why don't you use find_package(SDL2)?
I want to download the dependencies for the user.
c++ cmake sdl-2
I'm trying to get SDL2 using CMake's FetchContent. The build is done successfuly but when I try to install I get the error:
[build] Makefile:117: recipe for target 'install' failed
[build] CMake Error at _deps/sdl2-build/cmake_install.cmake:198 (file):
[build] file INSTALL cannot find
[build] "/home/brian/Develop/onion-engine/build/_deps/sdl2-build/libSDL2.so".
[build] Call Stack (most recent call first):
[build] cmake_install.cmake:171 (include)
Here is the piece of code doing the Fetch:
FetchContent_Declare(
SDL2
URL ${SDL_URI}
URL_HASH MD5=${SDL_HASH}
)
FetchContent_GetProperties(SDL2)
if(NOT sdl2_POPULATED)
FetchContent_Populate(SDL2)
message(STATUS "Source dir: ${sdl2_SOURCE_DIR}")
message(STATUS "Binary dir: ${sdl2_BINARY_DIR}")
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
target_link_libraries(myCode SDL2)
endif()
FAQ:
- Why don't you use find_package(SDL2)?
I want to download the dependencies for the user.
c++ cmake sdl-2
c++ cmake sdl-2
asked Nov 21 at 22:48
Brian Batista
234
234
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421504%2fcmake-fetchcontent-sdl2-doesnt-install%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown