-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (25 loc) · 1.04 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.19.0)
# Set the project name
SET( PROJECT_NAME GridLiquid2D )
PROJECT(${PROJECT_NAME})
# Define character set as Unicode
add_definitions(-DUNICODE -D_UNICODE)
# Set configuration types
Set(CMAKE_CONFIGURATION_TYPES Debug Release)
# Set the include/lib directory
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ext/DXViewer/DXViewer-3.1.0/include)
LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/ext/DXViewer/DXViewer-3.1.0/lib)
# Copy DLLs
FILE(GLOB DLL ${CMAKE_SOURCE_DIR}/ext/DXViewer/DXViewer-3.1.0/bin/*.dll)
FILE(COPY ${DLL} DESTINATION ${CMAKE_BINARY_DIR})
# Copy CSOs
FILE(GLOB CSO ${CMAKE_SOURCE_DIR}/ext/DXViewer/DXViewer-3.1.0/*.cso)
FILE(COPY ${CSO} DESTINATION ${CMAKE_BINARY_DIR})
# Collect source files
FILE( GLOB SRC ${CMAKE_SOURCE_DIR}/src/*.cpp )
FILE( GLOB HDR ${CMAKE_SOURCE_DIR}/src/*.h )
# Link Source files
ADD_EXECUTABLE( ${PROJECT_NAME} WIN32 ${SRC} ${HDR} )
# Set 'Additional Dependencies'
SET(LIB $<$<CONFIG:DEBUG>:DXViewer.lib> $<$<CONFIG:RELEASE>:DXViewerRel.lib>)
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${LIB})