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

Can't compile when using PowerShell? #31

Open
PerikiyoXD opened this issue Jan 18, 2025 · 1 comment
Open

Can't compile when using PowerShell? #31

PerikiyoXD opened this issue Jan 18, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@PerikiyoXD
Copy link

PerikiyoXD commented Jan 18, 2025

Reproducible steps

Open PowerShell.

Move to some new folder and create CMakeLists.txt:

cmake_minimum_required(VERSION 3.28)

project(BuildTest CXX C)

include(cmake/CPM.cmake)

CPMAddPackage(
    NAME openssl-cmake
    GITHUB_REPOSITORY "jimmy-park/openssl-cmake"
    GIT_TAG "main"
    OPTIONS 
        "OPENSSL_CONFIGURE_OPTIONS no-shared\\\\;no-tests"
        "OPENSSL_TARGET_PLATFORM VC-WIN32"
)

Calling cmake configuration:

mkdir build
cd build
cmake ..

Output:

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19044.
-- CPM: Adding package openssl-cmake@ (main)
-- [openssl-cmake] CPM: Adding package [email protected] (3.4.0)
-- [openssl-cmake] Curruent configure options : VC-WIN32;/FS;no-shared;no-tests
-- [openssl-cmake] Configure OpenSSL
"C:/Program" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
CMake Error at build/_deps/openssl-cmake-src/cmake/ConfigureOpenSSL.cmake:134 (execute_process):
  execute_process failed command indexes:

    1: "Child return code: 1"

Call Stack (most recent call first):
  build/_deps/openssl-cmake-src/CMakeLists.txt:162 (configure_openssl)


-- Configuring incomplete, errors occurred!

Some kind of quirk with the usage of " and spaces in paths. Of course.

@jimmy-park jimmy-park added the bug Something isn't working label Jan 18, 2025
@jimmy-park
Copy link
Owner

It seems like the perl path has spaces.
Could you change the branch and try it again?

CPMAddPackage(
    NAME openssl-cmake
    GITHUB_REPOSITORY jimmy-park/openssl-cmake
    GIT_TAG fix-windows-path
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants