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

Apparently cannot use libDaScript with CMake, when this is built as a dependency #1143

Open
Zetelias opened this issue Jun 21, 2024 · 0 comments

Comments

@Zetelias
Copy link

Hey, i am trying to emb dascript in my C++ application, but it gives linker errors. Since i could not find help on how to set up daScript in your C++ application with CMake, i am unsure wether the problem is on my side or on the daScript side. Regardless, i am submitting the issue.

My CMakeLists.txt file looks like that:

cmake_minimum_required(VERSION 3.15)
project(lengin CXX)



add_executable(lengin src/lengin.cpp src/main.cpp)

# Use the daScript library in the daScript subdirectory
set(DAS_AOT_EXAMPLES_DISABLED ON)
set(DAS_TUTORIAL_DISABLED ON)
set(DAS_TESTS_DISABLED ON)
set(DAS_GLFW_DISABLED ON)
set(DAS_PROFILE_DISABLED ON)
add_subdirectory(daScript)

target_link_libraries(lengin PRIVATE libDaScript)

install(TARGETS lengin DESTINATION "."
        RUNTIME DESTINATION bin
        ARCHIVE DESTINATION lib
        LIBRARY DESTINATION lib
        )

And the error i get is
LINK : fatal error LNK1104: cannot open file 'libDaScriptTest.lib'
It's also the same with MSVC in Visual Studio.

Surprising as i did tell it to disable tests (wouldnt compile otherwise).

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