Initial Commit
This commit is contained in:
25
CMakeLists.txt
Normal file
25
CMakeLists.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(chrome_cpp)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -march=native")
|
||||
|
||||
# FIX: Explicitly request ONLY the modules we need.
|
||||
# This prevents the linker from looking for missing VTK/HDF5 libraries
|
||||
# referenced by unused OpenCV modules.
|
||||
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
|
||||
|
||||
find_package(OpenMP)
|
||||
|
||||
if(OpenMP_CXX_FOUND)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
add_executable(chrome main.cpp)
|
||||
|
||||
# Link against the specific components found above
|
||||
target_link_libraries(chrome ${OpenCV_LIBRARIES})
|
||||
|
||||
if(OpenMP_CXX_FOUND)
|
||||
target_link_libraries(chrome OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
Reference in New Issue
Block a user