glpy/CMakeLists.txt

31 lines
1.1 KiB
CMake
Raw Normal View History

2024-06-28 06:57:41 +00:00
cmake_minimum_required(VERSION 3.15)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2024-06-28 09:17:37 +00:00
project(glpy VERSION 1.0 DESCRIPTION "a default project" LANGUAGES CXX)
2024-06-29 03:59:23 +00:00
add_compile_options(-Wall -Wextra -Wpedantic)
2024-06-28 06:57:41 +00:00
file(GLOB_RECURSE SRC src/*.cpp)
2024-06-29 03:59:23 +00:00
2024-06-28 06:57:41 +00:00
find_package(Python 3.12.3 COMPONENTS Interpreter Development REQUIRED)
find_package(pybind11 CONFIG REQUIRED)
2024-06-28 08:58:11 +00:00
2024-06-28 06:57:41 +00:00
pybind11_add_module(${PROJECT_NAME} ${SRC})
2024-06-28 08:58:11 +00:00
2024-06-28 14:58:16 +00:00
# add_subdirectory( ${PROJECT_SOURCE_DIR}/glew-cmake)
# target_link_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/build/glew-cmake/lib)
# target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/glew-cmake/include/)
2024-06-28 15:21:12 +00:00
2024-06-28 14:58:16 +00:00
# target_link_libraries(${PROJECT_NAME} PRIVATE glew)
2024-06-28 15:21:12 +00:00
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include)
2024-06-28 14:58:16 +00:00
2024-06-28 15:21:12 +00:00
target_link_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/libs)
2024-06-29 03:55:12 +00:00
target_link_libraries(${PROJECT_NAME} PRIVATE glew32)
2024-06-28 14:58:16 +00:00
2024-06-28 14:03:15 +00:00
add_subdirectory( ${PROJECT_SOURCE_DIR}/glfw )
2024-06-28 08:58:11 +00:00
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
2024-06-28 14:58:16 +00:00
2024-06-28 08:58:11 +00:00
find_package(OpenGl REQUIRED)
2024-06-28 15:21:12 +00:00
2024-06-29 03:15:57 +00:00
target_link_libraries(${PROJECT_NAME} PRIVATE OpenGL::GL)
2024-06-28 14:58:16 +00:00