-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
58 lines (46 loc) · 1.98 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.5)
project(wxMinesweeper LANGUAGES CXX)
# set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
# OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE SETUID SETGID
# )
# execute_process(
# COMMAND sudo mkdir -p /usr/local/include/wx-3.2/
# RESULT_VARIABLE mkdir_result
# )
# if(mkdir_result EQUAL 0)
# message("Directory created successfully or already exists.")
# else()
# message("Failed to create directory.")
# endif()
# include(ExternalProject)
# ExternalProject_Add(wxwidgets
# GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
# GIT_TAG v3.2.4
# STEP_TARGETS build
# )
aux_source_directory(. SRC_LIST)
# Copy images to the binary directory during build
file(COPY ${PROJECT_SOURCE_DIR}/logo.png DESTINATION {PROJECT_BINARY_DIR})
file(COPY ${PROJECT_SOURCE_DIR}/mine.png DESTINATION {PROJECT_BINARY_DIR})
file(COPY ${PROJECT_SOURCE_DIR}/clock.xpm DESTINATION {PROJECT_BINARY_DIR})
file(COPY ${PROJECT_SOURCE_DIR}/red-flag.png DESTINATION {PROJECT_BINARY_DIR})
#find_package(wxWidgets REQUIRED COMPONENTS net core base)
#if(wxWidgets_USE_FILE) # not defined in CONFIG mode
# include(${wxWidgets_USE_FILE})
#endif()
# add_executable(${PROJECT_NAME} ${SRC_LIST})
# target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES})
set(wxBUILD_MONOLITHIC OFF)
add_subdirectory(wxWidgets)
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} wx::net wx::core wx::base wx::xrc wx::qa wx::gl wx::xml)
# List all files in the current directory
file(GLOB CURRENT_DIR_CONTENTS build)
# Print out each file found
foreach(FILE ${CURRENT_DIR_CONTENTS})
message("File found: ${FILE}")
endforeach()
message(STATUS "CMake source directory: ${CMAKE_SOURCE_DIR}")
message(STATUS "CMake binary directory: ${CMAKE_BINARY_DIR}")
message(STATUS "Project source directory: ${PROJECT_SOURCE_DIR}")
message(STATUS "Project binary directory: ${PROJECT_BINARY_DIR}")