-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
36 lines (29 loc) · 1.48 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# CMakeLists.txt --- CMake project settings
# ex) cmake -G "Visual Studio 9 2008" .
# ex) cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" .
##############################################################################
# CMake minimum version
cmake_minimum_required(VERSION 3.5)
# project name and language
project(LineNumEdit CXX RC)
##############################################################################
# LineNumEdit.dll
add_library(LineNumEdit SHARED LineNumEdit.cpp)
target_compile_definitions(LineNumEdit PRIVATE UNICODE _UNICODE LINENUMEDIT_IMPL LINENUMEDIT_DLL)
set_target_properties(LineNumEdit PROPERTIES PREFIX "")
set_target_properties(LineNumEdit PROPERTIES OUTPUT_NAME "LineNumEdit")
target_link_libraries(LineNumEdit shlwapi)
# libLineNumEdit_static.a
add_library(LineNumEdit_static STATIC LineNumEdit.cpp)
target_compile_definitions(LineNumEdit_static PRIVATE UNICODE _UNICODE LINENUMEDIT_IMPL)
target_link_libraries(LineNumEdit_static shlwapi)
# LineNumEdit_test.exe
add_executable(LineNumEdit_test WIN32 LineNumEdit_test.cpp LineNumEdit_test_res.rc)
if(TRUE)
target_link_libraries(LineNumEdit_test comctl32 shlwapi LineNumEdit_static)
target_compile_definitions(LineNumEdit_test PRIVATE UNICODE _UNICODE LINENUMEDIT_IMPL)
else()
target_link_libraries(LineNumEdit_test comctl32 shlwapi)
target_compile_definitions(LineNumEdit_test PRIVATE UNICODE _UNICODE LINENUMEDIT_DLL)
endif()
##############################################################################