24 lines
632 B
CMake
24 lines
632 B
CMake
cmake_minimum_required(VERSION 3.16)
|
|
project(findwindow)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
# Enable static linking
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
|
|
|
add_executable(findwindow main.cpp
|
|
Utility.h
|
|
CommandLine.cpp
|
|
CommandLine.h
|
|
Utility.cpp
|
|
Process.cpp
|
|
Process.h
|
|
Window.cpp
|
|
Window.h
|
|
PrintHelper.h
|
|
PrintHelper.cpp)
|
|
|
|
# Add ntdll library for NtQueryInformationProcess
|
|
target_link_libraries(findwindow ntdll) |