Closed GrinlexGH closed 1 year ago
CMakeLists.txt of my project:
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)
set(PROJECT_NAME 3DEngine)
project(${PROJECT_NAME})
set(CMAKE_GENERATOR_PLATFORM x86)
add_executable(${PROJECT_NAME}
src/main.cpp)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
add_subdirectory(external/glfw)
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
add_subdirectory(external/glew/build/cmake)
target_link_libraries(${PROJECT_NAME} PRIVATE glew)
include_directories(external/glew/include)
I have fixed it
I just replaced libglew_static to glew_s
target_link_libraries(${PROJECT_NAME} PRIVATE glew_s)
hello, I created a glew project using cmake and it compiled a dynamic library. I need to use a static library. I write
target_link_libraries(${PROJECT_NAME} PRIVATE libglew_static)
in my project's CMakeLists.txt and the compiler says it can't find libglew_static.lib. I'm doing something wrong and I don't understand. Help please