Skip to content
This repository was archived by the owner on Oct 8, 2023. It is now read-only.

Commit 1a94234

Browse files
committed
Compile the rc file as well when compile using MSYS platform.
1 parent 25780c3 commit 1a94234

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

CMakeLists.txt

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
cmake_minimum_required (VERSION 2.6)
2-
project (ZipPicView CXX)
1+
cmake_minimum_required(VERSION 2.6)
2+
project(ZipPicView CXX)
33
set(CMAKE_CXX_STANDARD 11)
44

5-
include(CPack)
6-
set (CPACK_GENERATOR "ZIP")
5+
set(SRC ZipPicView MainFrame.cpp ZipPicViewApp.cpp ImageViewPanel.cpp)
76

8-
set (SRC ZipPicView MainFrame.cpp ZipPicViewApp.cpp ImageViewPanel.cpp)
9-
10-
if(WINDOWS)
11-
enable_language(RC)
12-
#CMake does not play well with GCC's windres.
13-
set (CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> -i <SOURCE>")
14-
set (SRC ${SRC} resource.rc)
15-
# set (CMAKE_EXE_LINKER_FLAGS "-static")
16-
endif(WINDOWS)
7+
if (WINDOWS OR MSYS)
8+
enable_language(RC)
9+
#CMake does not play well with GCC's windres.
10+
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> -i <SOURCE>")
11+
set(SRC ${SRC} resource.rc)
12+
endif (WINDOWS OR MSYS)
1713

1814
add_executable(${SRC})
1915

2016
set(wxWidgets_CONFIGURATION mswu)
2117
find_package(wxWidgets COMPONENTS core base REQUIRED)
2218
find_package(PkgConfig REQUIRED)
23-
pkg_check_modules (LIBZIP REQUIRED libzip)
19+
pkg_check_modules(LIBZIP REQUIRED libzip)
2420

25-
include(${wxWidgets_USE_FILE} )
21+
include(${wxWidgets_USE_FILE})
2622
include_directories(${LIBZIP_INCLUDE_DIRS})
2723

28-
target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES} ${LIBZIP_LIBRARIES})
24+
target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES} ${LIBZIP_LIBRARIES})

0 commit comments

Comments
 (0)