Initial commit to add all 3 custom projects
This commit is contained in:
60
ANSCustomFireNSmokeDetection/CMakeLists.txt
Normal file
60
ANSCustomFireNSmokeDetection/CMakeLists.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
project(ANSCustomFireNSmokeDetection LANGUAGES CXX)
|
||||
|
||||
# ---------- sources ----------
|
||||
set(SOURCES
|
||||
ANSCustomFireNSmoke.cpp
|
||||
dllmain.cpp
|
||||
pch.cpp
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
ANSCustomFireNSmoke.h
|
||||
framework.h
|
||||
pch.h
|
||||
)
|
||||
|
||||
# ---------- shared library (DLL) ----------
|
||||
add_library(${PROJECT_NAME} SHARED ${SOURCES} ${HEADERS})
|
||||
|
||||
# ---------- preprocessor definitions ----------
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
ANSCUSTOMFIRENSMOKE_EXPORTS
|
||||
_WINDOWS
|
||||
_USRDLL
|
||||
WIN32_LEAN_AND_MEAN
|
||||
NOMINMAX
|
||||
$<$<CONFIG:Debug>:_DEBUG>
|
||||
$<$<CONFIG:Release>:NDEBUG>
|
||||
)
|
||||
|
||||
# ---------- include directories ----------
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
C:/Projects/ANLS/ANSLIB/ANSLIB
|
||||
C:/ANSLibs/opencv/include
|
||||
)
|
||||
|
||||
# ---------- library directories & linking ----------
|
||||
target_link_directories(${PROJECT_NAME} PRIVATE
|
||||
C:/ProgramData/ANSCENTER/Shared
|
||||
C:/ANSLibs/opencv/x64/vc17/lib
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
ANSLIB
|
||||
opencv_world4130
|
||||
)
|
||||
|
||||
# ---------- compiler options (MSVC) ----------
|
||||
if(MSVC)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
/W3 # Warning level 3
|
||||
/sdl # SDL checks
|
||||
/permissive- # Conformance mode
|
||||
$<$<CONFIG:Release>:/O2 /Oi /GL> # Optimize + intrinsics + whole-program opt
|
||||
)
|
||||
|
||||
target_link_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Release>:/OPT:REF /OPT:ICF /LTCG> # Optimize refs, COMDAT folding, link-time codegen
|
||||
)
|
||||
endif()
|
||||
Reference in New Issue
Block a user