File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ add_library(${PROJECT_NAME} SHARED)
99
1010set (OPENCV_INCLUDE_DIR CACHE  PATH  "OpenCV include directory" )
1111set (OPENCV_LIBRARY_DIR CACHE  PATH  "OpenCV library directory" )
12+ if (NOT  MSVC_ARCH)
13+     set (MSVC_ARCH "AVX" )
14+ endif ()
1215
16+ message ("-- OPTIONS --" )
17+ message ("-- MSVC_ARCH: ${MSVC_ARCH} " )
18+ message ("-------------" )
1319
1420target_sources (${PROJECT_NAME}  PRIVATE  main.cpp main.def bgs.cpp hsv.cpp resource .rc)
1521set_target_properties (${PROJECT_NAME}  PROPERTIES SUFFIX  ".auf" )
@@ -23,7 +29,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE comctl32 ippicvmt
2329if ("${CMAKE_CXX_COMPILER_ID} "  MATCHES  "MSVC" )
2430    set_property (TARGET  ${PROJECT_NAME}  PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
2531    set_target_properties (${PROJECT_NAME}  PROPERTIES LINK_FLAGS  "/LARGEADDRESSAWARE" )
26-     target_compile_options (${PROJECT_NAME}  PRIVATE  /arch:AVX  /source -charset:utf-8 /execution-charset:shift_jis)
32+     target_compile_options (${PROJECT_NAME}  PRIVATE  /arch:${MSVC_ARCH}  /source -charset:utf-8 /execution-charset:shift_jis)
2733elseif ("${CMAKE_CXX_COMPILER_ID} "  MATCHES  "GNU" )
2834    target_link_options (${PROJECT_NAME}  PRIVATE  -static -libstdc++ -static )
2935endif ()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments