1 |
##--------------------------------------------------------------------------- |
2 |
## $RCSfile: CMakeLists.txt $ |
3 |
## $Source: CMakeLists.txt $ |
4 |
## $Revision: 1.48 $ |
5 |
## $Date: Feb 26, 2006 10:39:43 PM $ |
6 |
##--------------------------------------------------------------------------- |
7 |
## Author: Jorgen Bodde |
8 |
## Copyright: (c) Jorgen Bodde |
9 |
## License: wxWidgets License |
10 |
##--------------------------------------------------------------------------- |
11 |
|
12 |
##--------------------------------------------------- |
13 |
## Please set your wxWidgets configuration here |
14 |
##--------------------------------------------------- |
15 |
|
16 |
SET(CMAKE_FIND_LIBRARY_PREFIXES "") |
17 |
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") |
18 |
|
19 |
# Here you can define what libraries of wxWidgets you need for your |
20 |
# application. You can figure out what libraries you need here; |
21 |
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html |
22 |
SET(wxWidgets_USE_LIBS base core gl net adv) |
23 |
|
24 |
# We need the Find package for wxWidgets to work |
25 |
FIND_PACKAGE(wxWidgets) |
26 |
|
27 |
##--------------------------------------------------- |
28 |
## Actual config file starts here |
29 |
##--------------------------------------------------- |
30 |
|
31 |
# Did we find wxWidgets ? This condition will fail |
32 |
# for as long as the internal vars do not point to |
33 |
# the proper wxWidgets configuration |
34 |
IF(wxWidgets_FOUND) |
35 |
|
36 |
# Include wxWidgets macros |
37 |
INCLUDE(${wxWidgets_USE_FILE}) |
38 |
|
39 |
# Our project is called 'minimal' this is how it will be called in |
40 |
# visual studio, and in our makefiles. |
41 |
PROJECT( minimal ) |
42 |
|
43 |
# We define the include paths here, our minimal source dir is one, |
44 |
# and also the include dirs defined by wxWidgets |
45 |
INCLUDE_DIRECTORIES(${minimal_SOURCE_DIR} |
46 |
${wxWidgets_INCLUDE_DIRS} ) |
47 |
|
48 |
# For convenience we define the sources as a variable. You can add |
49 |
# header files and cpp / c files and CMake will sort them out |
50 |
SET(SRCS main.cpp ) |
51 |
|
52 |
# If we build for windows systems, we also include the resource file |
53 |
# containing the manifest, icon and other resources |
54 |
IF(WIN32) |
55 |
SET(SRCS ${SRCS} minimal.rc) |
56 |
ENDIF(WIN32) |
57 |
|
58 |
# Here we define the executable minimal.exe or minimal on other systems |
59 |
# the above paths and defines will be used in this build |
60 |
ADD_EXECUTABLE(wx2 WIN32 ${SRCS}) |
61 |
|
62 |
# We add to our target 'minimal' the wxWidgets libraries. These are |
63 |
# set for us by the find script. If you need other libraries, you |
64 |
# can add them here as well. |
65 |
TARGET_LINK_LIBRARIES(wx2 ${wxWidgets_LIBRARIES} ) |
66 |
|
67 |
ELSE(wxWidgets_FOUND) |
68 |
# For convenience. When we cannot continue, inform the user |
69 |
MESSAGE("wxWidgets not found!") |
70 |
ENDIF(wxWidgets_FOUND) |