[CMake] cpack_add_component

2019-03-11 Thread Micha Renner
In CPack I can add a component with cpack_add_component and describe
the component with the additional arguments of the macro.
I can also describe the component if I use the varibales of type
CPACK_COMPONENT__XXX (e.g.
CPACK_COMPONENT__HIDDEN).
So which one is the right way? Or doesn't matter which way I use.

Regards

Michael

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[CMake] CPack and WIX: Preselected components

2019-01-17 Thread Micha Renner
With the NSIS generator I can create a dialog with a drop_down list
with two elements default and developer. Default is selected by default
when the dialog starts, so the default parts of the package are
installed. Selecting developer the devlop parts are installed and the
default files not. 

How can I do the same with the WiX generator?

With code below the WiX generator installs the complete package. 
What I want is that the user can selected the develop part if he wants
it.


___
Example as it works with NSIS. There is nothing specific for NSIS.

ADD_LIBRARY(mylib mylib.c)

ADD_EXECUTABLE(myapp myapp.c mylib.h)
TARGET_LINK_LIBRARIES(myapp mylib)

INSTALL(TARGETS mylib ARCHIVE DESTINATION lib COMPONENT libraries)
INSTALL(TARGETS myapp RUNTIME DESTINATION bin COMPONENT applications)
INSTALL(FILES mylib.h DESTINATION include COMPONENT headers)
INSTALL(FILES free.txt DESTINATION doc COMPONENT dokumentation)

# WIX specific
SET(CPACK_WIX_UPGRADE_GUID 939B61C9-8E66-4876-A425-F7CDD7E6A6B2)
SET(CPACK_GENERATOR WIX)

INCLUDE(CPackComponent)

cpack_add_install_type(Default DISPLAY_NAME Default)
cpack_add_install_type(Developer)

cpack_add_component(applications DISPLAY_NAME "App" DESCRIPTION
"Application only"
GROUP "Runtime" INSTALL_TYPES Default)

cpack_add_component(dokumentation DISPLAY_NAME "Doc" DESCRIPTION "Doc
for the app"
GROUP "Runtime" INSTALL_TYPES Default)

cpack_add_component(libraries DISPLAY_NAME "lib" DESCRIPTION "For
devloper only"
GROUP "Development" INSTALL_TYPES Developer)

cpack_add_component(headers DISPLAY_NAME "C++ Headers" DESCRIPTION
"C/C++ header files for use with MyLib"
DEPENDS libraries INSTALL_TYPES Developer GROUP "Development")

cpack_add_component_group(Runtime)
cpack_add_component_group(Development DESCRIPTION "All you need for
development")

SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_PARENT_GROUP "Runtime")

INCLUDE(CPack)

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] WINDOWS_EXPORT_ALL_SYMBOLS

2016-01-27 Thread Micha Renner
Am Mittwoch, den 27.01.2016, 10:27 -0500 schrieb Bill Hoffman:
> On 1/26/2016 12:51 PM, Bill Hoffman wrote:
> > 
> > I am running the community edition...  Maybe there is some
> > difference
> > with express?
> One other question, did you build 64 or 32 bit?

64-bit.

Michael

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] CMAKE_PUSH_CHECK_STATE()

2015-08-21 Thread Micha Renner
Hallo,

CMAKE_PUSH_CHECK_STATE() CMAKE_POP_CHECK_STATE() affect 
CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS,
CMAKE_REQUIRED_LIBRARIES and CMAKE_REQUIRED_INCLUDES.

Maybe one can extend CMAKE_PUSH_CHECK_STATE() CMAKE_POP_CHECK_STATE() to
controll CMAKE_EXTRA_INCLUDE_FILES also.

Michael Renner


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] FIND_LIBRARY_USE_LIB64_PATHS on Win64

2015-06-22 Thread Micha Renner
Hi,

does FIND_LIBRARY_USE_LIB64_PATHS work with Windows64.

From this ...
https://public.kitware.com/Bug/view.php?id=15301#c37449
...one might conclude it does, but on my Win64-System

PROJECT(T LANGUAGES C)
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
GET_PROPERTY(r22 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)

it is always FALSE.

Greetings 

Michael







-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Find a 64-bit library

2015-06-03 Thread Micha Renner
Hallo,

I want to find the library MSImg32 on a Windos 8.1 system 64-bit.

The library is located here:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64
\MSImg32.Lib
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\MSImg32.Lib
C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64\MSImg32.Lib
C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86\MSImg32.Lib

The script uses these commands to locate the library
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)

FIND_LIBRARY(MS_IMG_32_LIBRARY MSImg32)

The result is:
C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86/MSImg32.Lib

So what can I do to find the 64-bit version of MSImg32.

Greetings

Micha


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] generator expressions

2015-04-08 Thread Micha Renner
Hi,

I try to understand the concept of generator expressions with little
avail.

For the current project I thought, I could use them in combination with
TARGET_INCLUDE_DIRECTORIES.
Instead of writting
IF(t1)
TARGET_INCLUDE_DIRECTORIES(cTest PRIVATE path/to/h1 PRIVATE path/to/h2)
ELSE(t1)
TARGET_INCLUDE_DIRECTORIES(cTest PRIVATE path/to/h1)
ENDIF(t1)

it should be more elegant

SET(t1 ON)
ADD_EXECUTABLE(cTest CTest.c cTest.h)
TARGET_INCLUDE_DIRECTORIES(cTest PRIVATE path/to/h1 $
$BOOL:t1:PRIVATE path/to/h2)

Of course this creates a major disaster.

--
CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0021 is not set: Fatal error on relative paths in
  INCLUDE_DIRECTORIES target property.  Run cmake --help-policy
CMP0021 for
  policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  Found relative path while evaluating include directories of cTest:

PRIVATE path/to/h2

This warning is for project developers.  Use -Wno-dev to suppress it.

cmake: 
/home/gildemeister/Picture/work-c/CMakeSrc/cmake-3.2.1/Source/cmLocalGenerator.cxx:2923:
 std::string cmLocalGenerator::ConvertToRelativePath(const 
std::vectorstd::basic_stringchar , const string, bool): Assertion 
`in_remote[0] != '\'' failed.
Abgebrochen (Speicherabzug geschrieben)
--

Is there a way to solve this with a generator expression?

Michael



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] install(files...

2015-02-17 Thread Micha Renner
Hello,

In the manual the install(FILES...) command is described as this:
install(FILES|PROGRAMS files... DESTINATION dir
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[COMPONENT component]
[RENAME name] [OPTIONAL])

So what is the meaning of COMPONENT and OPTIONAL?

Greetings

Micha



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] CMake Vs 2012 Express 64bit

2014-12-10 Thread Micha Renner
Hi all,

is there a way that CMake create solution files for 64-bit targets?
(Visual Studio 2012  Express)

Greetings
Michael


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Unclear warning

2014-12-09 Thread Micha Renner
Am Dienstag, den 09.12.2014, 01:52 -0800 schrieb Alan W. Irwin:

 Hi Nils:
 
 I have never understood CMP0054 until now when I read your above
 clear explanation.  So thanks very much for that!
 
Same from me. Excellent work. It makes things clearer.

Greetings 

Michael




-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Unclear warning

2014-12-08 Thread Micha Renner
Hi,

what does this message mean?

The ASM_MASM compiler identification is MSVC
CMake Warning (dev) at C:/Program
Files/CMake/share/cmake-3.1/Modules/CMakeFindBinUtils.cmake:33 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables
or
keywords when unquoted.  Run cmake --help-policy CMP0054 for policy
details.  Use the cmake_policy command to set the policy and suppress
this
  warning.

  Quoted variables like MSVC will no longer be dereferenced when the
policy
  is set to NEW.  Since the policy is not set the OLD behavior
will be used.
Call Stack (most recent call first):
  C:/Program
Files/CMake/share/cmake-3.1/Modules/CMakeDetermineASMCompiler.cmake:137
(include)
  C:/Program
Files/CMake/share/cmake-3.1/Modules/CMakeDetermineASM_MASMCompiler.cmake:27 
(include)
  src/CMakeLists.txt:44 (ENABLE_LANGUAGE)

Is this a wanted warning?

Greetings

Michael


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] CMake and 64-bit Systems

2014-12-04 Thread Micha Renner
Hallo,

does CMake run on 64-bit OS (e.g. Ubuntu 14.10 64-bit) without problems
or are there some workarounds necessary to get it run? If so, is there a
description available?

Greetings

Michael





-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] The target property LOCATION

2014-05-27 Thread Micha Renner
Hi,

FIND_PACKAGE(TLib) 

GET_TARGET_PROPERTY(Result MiG::TLib LOCATION)

results in
/usr/local/lib/libTLib.so.3.4.1

I would expect /usr/local/lib/libTLib.so

Is this a bug or a feature?

Micha


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE

2014-03-31 Thread Micha Renner
Hallo,

The Documentation says: Automatically add the current source- and build
directories to the INTERFACE_INCLUDE_DIRECTORIES.
How can I get this information?


SET(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
ADD_LIBRARY(TLib1 SHARED tlib1.c tlib1.h)
GET_TARGET_PROPERTY(TLIB1_INTERFACE_INCLUDE_DIRECTORIES TLib1
INTERFACE_INCLUDE_DIRECTORIES)

Results in TLIB1_INTERFACE_INCLUDE_DIRECTORIES-NOTFOUND.
Any ideas?

Greetings Micha



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Index CMake strings

2014-03-13 Thread Micha Renner
Hallo,

is it possible to index CMake strings.
In C it would something like this:

char c = Str[3];

Micha


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Redirect output from add_custom_target()

2013-04-04 Thread Micha Renner
I would try

add_custom_target( ${doc_target_name}
 DEPENDS ${generated_conf}
 COMMAND ${doxygen_exe} ${generated_conf} 2  filename
 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 COMMENT Generating documentation using Doxygen
 )

Micha


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] INCLUDE_DIRECTORIES (command vs target property)

2012-10-22 Thread Micha Renner
Hello,

The target property INCLUDE_DIRECTORIES overwrites the
include_directories command values.

A better way would have been that the values of the include_directories
command would appended to the values of the target property
INCLUDE_DIRECTORIES.
I think that would make more sense.

INCLUDE_DIRECTORIES(general_include_directories)

# Projet A
...
SET_TARGET_PROPERTIES(ProA PROPERTIES 
INCLUDE_DIRECTORIES ${ProjAIncludeDirs}) 
...

# Projet B
...
SET_TARGET_PROPERTIES(ProB PROPERTIES 
INCLUDE_DIRECTORIES ${ProjBIncludeDirs}) 
...

Grettings

Micha Renner


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CMAKE_C_COMPILER_VERSION

2012-09-20 Thread Micha Renner
Is the intention of CMAKE_[C|CXX]_COMPILER_VERSION to check the [C|C
++]-compiler version platform independent?

Greetings

Micha


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] GENERATE_EXPORT_HEADER

2012-09-05 Thread Micha Renner
For static libraries the macro GENERATE_EXPORT_HEADER produce an output
like this one:

...
#else
#  ifndef CTEST_EXPORT
#ifdef cTest_EXPORTS
/* We are building this library */
#  define CTEST_EXPORT 
#else
/* We are using this library */
#  define CTEST_EXPORT 
#endif
#  endif
...

For for a static version of a library CTEST_EXPORT is empty.

For Windows and the MSVC it is not always a good idea, since the MSVC
can produce errors in this case.

So I propose (static versions of libraries): For the MSVC and Windows
CTEST_EXPORT should be defined with extern, either by option or by
default.

Greeting

Micha


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Link errors on Wiki/CMake

2012-07-17 Thread Micha Renner

The following links of www.cmake.org/Wiki/CMake generate 404 Errors

How CMake simplifies the build process by Bruno Abinader
Part 1 - Basic build system :
http://www.abinader.com.br/bruno/how-cmake-simplifies-the-build-process-part-1-basic-build-system/


Howto use cmake with C/C++ projects:
http://snikt.net/index.php/2010/04/01/howto-use-cmake-with-cc-projects


The Hacker Within: Build Systems:
http://hackerwithin.org/thw/plugin_wiki/page/buildsystems

CMakeListGenerator (Win32)
http://www.vanvelzensoftware.com/postnuke/index.php?name=Downloadsreq=viewdownloadcid=7


Server not found
Slightly newer version here vcproj2cmake.rb
http://dgwarp.hd.free.fr/vcproj2cmake.rb


generates a black pdf:
Media:CTest Running Modes.pdf
http://www.cmake.org/Wiki/images/0/0a/CTest_Running_Modes.pdf

greetings

Micha




--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Visual Studio rebuilding ZERO_CHECK

2012-06-13 Thread Micha Renner
Am Mittwoch, den 13.06.2012, 14:51 +0200 schrieb Robert Carnecky:
 Hello,
 
 My Visual Studio 2010 is constantly prompting me to build ZERO_CHECK 
 every time I try to run my program, even though nothing has changed. Is 
 there a workaround for this?

No, that is the current situation. This problem and some others belong
to a complex of problems which CMake has with Visual Studio since 2008.
May be it becomes better with VS 2012.

Micha


 
 How to reproduce:
 1. Set up the simplest project possible (see below).
 2. Configure and generate using the CMake GUI.
 3. Open the project file and build the project. Project successfully builds.
 4. Start the application from within Visual Studio (press F5). A message 
 box appears, saying This project is out of date: ZERO_CHECK. Would you 
 like to build it?.
 5. Click on yes. ZERO_CHECK is built, no actual code gets compiled. The 
 application starts and exits.
 6. Go to step 4 (message box appears again).
 
 I do not want to enable automatic rebuilds without prompts, since I have 
 other projects where a build can take very long and I do not want to 
 start it when not necessary. Starting a build immediately deletes the 
 executable file and I would not be able to run the last version while 
 making changes to the code.
 
 Thanks in advance,
 Robert
 
 
 CMakeLists.txt:
 project(test)
 cmake_minimum_required (VERSION 2.8.8)
 add_executable(main main.cpp)
 
 main.cpp:
 int main() {return 0;}
 
 System:
 CMake 2.8.8
 Visual Studio 2010, 64bit compiler
 Windows 7 64bit
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] add_custom and files generated into subdirectories

2012-04-12 Thread Micha Renner
I guess, this is one of the rare cases where one need:

SET_SOURCE_FILES_PROPERTIES(Foo.cpp PROPERTIES GENERATED TRUE)

Greetings

Micha


Am Mittwoch, den 11.04.2012, 11:18 -0500 schrieb William R. Otte:
 Hi - 
 
 I have a question about resolving dependencies when add_custom is used to 
 generate files into subdirectories.  Consider the following example 
 (substantially simplified from my use case, but it captures the essence of 
 what I am trying to do:
 
 In the root of the project, I have the following:
 
 /Foo.cmake:
 add_custom_command (OUTPUT Bar/Foo.cpp
 COMMAND touch Bar/Foo.cpp
)
 
 #end /Foo.cmake
 
 /CMakeLists.txt:
 cmake_minimum_required(VERSION 2.8)
 
 include (Foo.cmake)
 add_subdirectory (Bar)
 
 #end /CMakeLists.txt
 
 In a subdirectory Bar, I have the following:
 
 /Bar/Bar.cmake:
 add_library ( Bar SHARED
   Foo.cpp )
 #end /Bar/Bar.cmake
 
 /Bar/CMakeLists.txt:
 include (Bar.cmake)
 #end /Bar/CMakeLists.txt
 
 
 When I attempt to compile this into makefiles, I get the following diagnostic 
 from cmake:
 
 CMake Error at Bar/Bar.cmake:1 (add_library):
   Cannot find source file:
 
 Foo.cpp
 
   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
   .hxx .in .txx
 Call Stack (most recent call first):
   Bar/CMakeLists.txt:1 (include)
 
 
 I understand why that diagnostic is appearing (cmake knows about a 
 Bar/Foo.cpp, but not about a Foo.cpp).  Is there some way to get Cmake to 
 automagically realize that within the context of Bar.cmake, Foo.cpp and 
 Bar/Foo.cpp are the same thing?
 
 thanks,
 /-Will
 
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CheckIncludeFiles problem

2012-02-02 Thread Micha Renner
May be, there is an error when the compiler process the header file.
During CHECK_INCLUDE_FILES CMake invokes the Compiler to check whether
the header file works fines. In most cases reason is a missing
additional header files (but not always).

So, check the log files of CMake in the binary directory of your
project.

Greetings

Micha





Am Donnerstag, den 02.02.2012, 11:58 +0100 schrieb Yngve Inntjore
Levinsen:
 Dear all,
 
 I have a problem with CheckIncludeFiles that I cannot figure out. I'm sure 
 I'm 
 just making a stupid mistake though, but I am unable to figure out what. The 
 following code is in CMakeLists.txt:
 
 include(CheckIncludeFiles)
 
 check_include_files(readline/history.h HAVE_READLINE_HISTORY_H)
 check_include_files(sys/select.h HAVE_SYS_SELECT_H)
 
 
 And both headers are installed on my system:
 $ ls -lh /usr/include/sys/select.h /usr/include/readline/history.h
 -rw-r--r-- 1 root root 9,9K 21.07.2011 04:40 /usr/include/readline/history.h
 -rw-r--r-- 1 root root 4,1K 26.10.2011 20:03 /usr/include/sys/select.h
 
 CMake only finds sys/select.h though, and I don't see the difference. What 
 might 
 I be missing? I use cmake version 2.8.7.
 
 Thanks!
 
 Cheers,
 Yngve
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Anybody succeeded with VS/NASM?

2011-10-19 Thread Micha Renner
Am Dienstag, den 18.10.2011, 13:47 +0400 schrieb Vladimir Chebotarev:
 Hi, Micha.
 
 When is it going to get fixed?
I dont't know.

  Can I help with it?
I would appreciate it, but I'm not a maintainer.

#12465 of the bugtracker had been closed now.
Please look here http://public.kitware.com/Bug/view.php?id=11536 to see
what happens.
If you have questions or suggestions, you should login there.

Greetings

Micha






 Am Montag, den 17.10.2011, 21:42 +0400 schrieb Vladimir Chebotarev:
  Hi.
  
  I'm trying to compile .cpp file along with .asm on Visual Studio.
  It correctly finds NASM assembler, but .asm file seems not to be included 
  to build.
  
  Have tried VS 2005 and 2010, cmake 2.8.6 and 2.8.6-20111015.
  It works on linux/make generators of course.
 
 This is currently not possible.
 See: http://public.kitware.com/Bug/view.php?id=12465
 
 A work-around is here:
 http://www.cmake.org/pipermail/cmake/2011-August/045881.html
 
 Look for The only way to use... 
 It should work for nasm too.
 
 --
 Best Regards.
 Vladimir.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Anybody succeeded with VS/NASM?

2011-10-18 Thread Micha Renner
Am Montag, den 17.10.2011, 21:42 +0400 schrieb Vladimir Chebotarev:
 Hi.
 
 I'm trying to compile .cpp file along with .asm on Visual Studio.
 It correctly finds NASM assembler, but .asm file seems not to be included to 
 build.
 
 Have tried VS 2005 and 2010, cmake 2.8.6 and 2.8.6-20111015.
 It works on linux/make generators of course.

This is currently not possible.
See: http://public.kitware.com/Bug/view.php?id=12465

A work-around is here:
http://www.cmake.org/pipermail/cmake/2011-August/045881.html

Look for The only way to use... 
It should work for nasm too.

Greetings

Micha


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Does find_library check that a found library does in fact link?

2011-09-29 Thread Micha Renner
Am Donnerstag, den 29.09.2011, 09:22 +0200 schrieb Hendrik Sattler:
 Zitat von Michael Wild them...@gmail.com:
  Just a few of my thoughts on this:
 
 Same for me.
 
  - There are several ways to handle dead symlinks:
1. Don't check, let the linker complain (status quo)
2. Check whether the found library is a symlink, and if not valid,
   remove it silently from the list of candidates. Can be very
   surprising and will likely result in quite a few bug reports
   about CMake not finding a certain library that is clearly there.
3. Like 2, but warn about the issue. Possibly very annoying.
  I don't know which option to prefer (perhaps somebody finds another one
  that is better?). IMHO bogus symlinks to shared libraries constitute a
  real problem of the library installation, so CMake shouldn't just paper
  over it by silently skipping the dead link, proceeding to the next
  candidate which rules out option 2 for me. Also, option 3 can be
  troublesome in automated setups where no user actually reads the CMake
  output.
 
 People tend to misunderstand the purpose of build systems like CMake  
 and autotools. They try to make the detection bullet-proof and most  
 likely fail. You can see that this is wrong by looking at those auto*  
 setups that take ages to detect all possible header files and use an  
 ifdef hell to handle that in the code, run lots of link and  
 symbol-finding tests, and still fail on conditions that the author  
 simple didn't consider or know.
 
 I prefer option 1. It's not CMake's duty to detect or paper over  
 messed-up systems. That's the administrator's job!
 BTW: running ldconfig -v on Linux likely tells you about the  
 dangling symlink.
 
 What's next? Asking for a syntax check of found header files so that  
 the compiler doesn't complain on broken header files?

This is exactly what CHECK_INCLUDE_FILES does (via TRY_COMPLIE).
It works good as long as the header file has no predecessor. In that
case CHECK_INCLUDE_FILES reports FILE-NOT-FOUND. It would save a lot of
time, if there would be notice that CHECK_INCLUDE_FILES tests the header
file.
Check if the files can be included is not enough.

Greetings

Micha



 
 HS
 
 
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Does find_library check that a found library does in fact link?

2011-09-29 Thread Micha Renner
Am Donnerstag, den 29.09.2011, 10:32 +0200 schrieb Hendrik Sattler:
 Zitat von Micha Renner micha.ren...@t-online.de:
 
  Am Donnerstag, den 29.09.2011, 09:22 +0200 schrieb Hendrik Sattler:
  Zitat von Michael Wild them...@gmail.com:
   Just a few of my thoughts on this:
 
  Same for me.
 
   - There are several ways to handle dead symlinks:
 1. Don't check, let the linker complain (status quo)
 2. Check whether the found library is a symlink, and if not valid,
remove it silently from the list of candidates. Can be very
surprising and will likely result in quite a few bug reports
about CMake not finding a certain library that is clearly there.
 3. Like 2, but warn about the issue. Possibly very annoying.
   I don't know which option to prefer (perhaps somebody finds another one
   that is better?). IMHO bogus symlinks to shared libraries constitute a
   real problem of the library installation, so CMake shouldn't just paper
   over it by silently skipping the dead link, proceeding to the next
   candidate which rules out option 2 for me. Also, option 3 can be
   troublesome in automated setups where no user actually reads the CMake
   output.
 
  People tend to misunderstand the purpose of build systems like CMake
  and autotools. They try to make the detection bullet-proof and most
  likely fail. You can see that this is wrong by looking at those auto*
  setups that take ages to detect all possible header files and use an
  ifdef hell to handle that in the code, run lots of link and
  symbol-finding tests, and still fail on conditions that the author
  simple didn't consider or know.
 
  I prefer option 1. It's not CMake's duty to detect or paper over
  messed-up systems. That's the administrator's job!
  BTW: running ldconfig -v on Linux likely tells you about the
  dangling symlink.
 
  What's next? Asking for a syntax check of found header files so that
  the compiler doesn't complain on broken header files?
 
  This is exactly what CHECK_INCLUDE_FILES does (via TRY_COMPLIE).
  It works good as long as the header file has no predecessor. In that
  case CHECK_INCLUDE_FILES reports FILE-NOT-FOUND. It would save a lot of
  time, if there would be notice that CHECK_INCLUDE_FILES tests the header
  file.
  Check if the files can be included is not enough.
 
 And what does it gain you to do this check except wasting time during  
 build configuration? Do you really check that any add_definitions()  
 does not alter the result? After all, you only get the real result  
 during project compilation.
That is not my point. 
I only say that CHECK_INCLUDE_FILES already tests header files and
CHECK_INCLUDE_FILES reports FILE-NOT_FOUND if the tested header file
needs a predecessor header file.
I bet, that in this case many users rack their brains why
CHECK_INCLUDE_FILES does not find the header file, despite they can see
it in the directory and this should be documented.

The rest is a decision of the maintainers, which I do not comment.

Greetings
Micha

 
 HS
 
 
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Nested Project()

2011-08-16 Thread Micha Renner
Am Montag, den 15.08.2011, 22:43 +0200 schrieb klaas.holwerda:
 Hi,
 
 I have several nested directories, and each directory contains a 
 CMakeLists.txt file.
 And most start with PROJECT(  ) Where xxx is some name for what I like to 
 contains some targets.
 
 In VC it is possible to create in the top solution, so called solution 
 folders.
 Why does CMake not use the PROJECT() statement to create such solution 
 folders, in order to group 
 targets?
You can group targets.
Documentation and how to do, is described here (as a start point):
http://www.cmake.org/pipermail/cmake/2010-December/041375.html

There are limits...
http://public.kitware.com/Bug/view.php?id=11436

...and it does not work with VS Express, as much as I know.

Greetings

Micha



 
 If I remember well, in older versions of Cmake its VC generators, this was 
 like that.
 I even remember the documentation of PROJECT() did mention it as a special 
 feature for VC in those days.
 Why is it gone?
 
 Regards,
 
 Klaas
 
 
 
 
 
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] masm msvc

2011-08-15 Thread Micha Renner
This script...

# Copy  paste from CMake Wiki
# Works only if CMake runs in the Visual Studio DOS Window 
SET(MASMFound FALSE)
# test whether it is a x86 machine and masm is available
IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86)
ENABLE_LANGUAGE(ASM_MASM)
IF(CMAKE_ASM_MASM_COMPILER_WORKS)
SET(MASMFound TRUE)
ENDIF(CMAKE_ASM_MASM_COMPILER_WORKS)
ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86)
# no assembler found
IF(NOT MASMFound)
MESSAGE(STATUS NOT)
ENDIF(NOT MASMFound)

...generates still the message:
The ASM_MASM compiler identification is unknown --!
Found assembler: C:/Program Files/Microsoft Visual Studio
10.0/VC/bin/ml.exe

-
# cAsm.asm is the main program
ADD_EXECUTABLE(tt cAsm.asm)

In Visual Studio the masm starts, but generates these nice messages:
3MASM : warning A4018: invalid command-line option : /STACK:1000
3MASM : warning A4018: invalid command-line option : /SACK:1000
3MASM : warning A4018: invalid command-line option : /SCK:1000
3MASM : warning A4018: invalid command-line option : /SK:1000
3MASM : warning A4018: invalid command-line option : /S:1000
3MASM : warning A4018: invalid command-line option : /S1000
3MASM : warning A4018: invalid command-line option : /S000
3MASM : warning A4018: invalid command-line option : /S00
3MASM : warning A4018: invalid command-line option : /S0
3MASM : warning A4018: invalid command-line option : /S
3MASM : warning A4018: invalid command-line option : /S000
3MASM : warning A4018: invalid command-line option : /S00
3MASM : warning A4018: invalid command-line option : /S0
3  Microsoft (R) Macro Assembler Version 10.00.30319.01
3  Copyright (C) Microsoft Corporation.  All rights reserved.
3  
3MASM : warning A4018: invalid command-line option : /machine:X86
3MASM : warning A4018: invalid command-line option : /debug
3MASM : warning A4018: invalid command-line option : /subsystem:console
3MASM : warning A4018: invalid command-line option : -o
3   Assembling: tt.exe
3MASM : fatal error A1000: cannot open file : tt.exe

# --
ADD_EXECUTABLE(tt cTest.c cAsm2.asm)
main in cTest.c. cAsm2.asm has a function only.
Visual Studio does not start the masm. A right click on cAsm2.asm in the
project explorer = properties
says: element type: Not part of the build.

# --
The only way to use the masm seems to be:
ADD_CUSTOM_COMMAND(OUTPUT cAsm2.obj
COMMAND ${CMAKE_ASM_MASM_COMPILER} -c
${CMAKE_CURRENT_SOURCE_DIR}/cAsm2.asm
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cAsm2.asm
COMMENT generate cAsm2.obj) 

ADD_EXECUTABLE(cTest CTest.c cAsm2.obj)

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] .S files and assembler

2011-08-10 Thread Micha Renner
Hi,

in http://www.cmake.org/pipermail/cmake/2009-November/033346.html
I found the line: If the file (.S) needs to be preprocessed, set the
LANGUAGE source file property to C, this should work in most cases for
now.
Is this still the way to process .S-files. In 2009 it sounded so
temporary.

And if so, where is it documented?

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Easing the pain with Visual Studio 2010 and CMake

2011-08-04 Thread Micha Renner
Am Donnerstag, den 04.08.2011, 10:05 +0200 schrieb Thomas Sondergaard:
 It is a bit of a pain to work with Visual Studio 2010 and CMake due to 
 this bug: http://gccxml.org/Bug/view.php?id=11258 (VS 2010 CMake plugin 
 is broken). It doesn't look like much progress is being made with fixing 
 this bug, so I'm looking for workarounds.
 
 To this point, whenever I've changed anything that I know will cause 
 CMake to rerun I will close the solution, run cmake by hand in a shell 
 and then open the solution again.  

That's the way to do it. Currently, there is no other solution, but I
always thought that this problem is limited to the Express Version of VS
(no makros).

Greetings

Micha




___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] ADD_CUSTOM_COMMAND and Dependencies

2011-08-01 Thread Micha Renner
Am Montag, den 25.07.2011, 15:49 +0200 schrieb Michael Wild:
 On 07/25/2011 03:24 PM, Micha Renner wrote:
  There is following sequence:
  
  ADD_EXECUTEABLE(generator gen.c)
  
  ADD_CUSTOM_COMMAND(OUTPUT tlib.h
  COMMAND generator  tlib.h)
  
  ADD_LIBRARY(tlib tlib.c tlib.h)
  
  The question: Is it sure that ADD_EXECUTEABLE is invoked before the
  library is build or is here an ADD_DEPENDENCIES(tlib generator)
  necessary?
  
  Greetings
  
  Micha
  
 
 Yes, CMake should recognize that generator is a target and create the
 dependency of tlib.h on generator automagically. And since it knows
 that tlib.h is GENERATED, it will also add a dependency of tlib on
 tlib.h. If you want to make really sure that CMake understands that
 generator is a target, use generator expressions, like
 $TARGET_FILE:generator, but that works only since 2.8.4.

So really clear is this not.
After studying the documentation, to get more information for
target_file, I found this line in the add_custom_command documentation:
Additionally, if the target is an executable or library a file-level
dependency is created to cause the custom command to re-run whenever the
target is recompiled.

ADD_CUSTOM_COMMAND(OUTPUT tlib.h COMMAND generator  tlib.h DEPENDS
generator) should solve my problem.

But what is the difference to 
ADD_CUSTOM_COMMAND(OUTPUT tlib.h COMMAND $TARGET_FILE:generator
generator  tlib.h)?

Greetings

Micha




___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] install(script ... and memory loss

2011-07-26 Thread Micha Renner
In a CMakeLists file, there is this command:

INSTALL(SCRIPT tInstall.txt)

During processing tInstall.txt none of global variables (e.g. MSVC,
CMAKE_SHARED_LIBRARY_SUFFIX ...) has a value.

Is this a bug or a feature?

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install(script ... and memory loss

2011-07-26 Thread Micha Renner
This is a really good idea, thank you.
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tInstall.txt.in
 ${CMAKE_CURRENT_BINARY_DIR}/tInstall.txt)
  install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/tInstall.txt)
 
 
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] ADD_CUSTOM_COMMAND and Dependencies

2011-07-25 Thread Micha Renner
There is following sequence:

ADD_EXECUTEABLE(generator gen.c)

ADD_CUSTOM_COMMAND(OUTPUT tlib.h
COMMAND generator  tlib.h)

ADD_LIBRARY(tlib tlib.c tlib.h)

The question: Is it sure that ADD_EXECUTEABLE is invoked before the
library is build or is here an ADD_DEPENDENCIES(tlib generator)
necessary?

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Checking SoVersion of Shared Library

2011-05-12 Thread Micha Renner
Am Donnerstag, den 12.05.2011, 11:15 +0300 schrieb tiantik:
 Hi CMake's members,
 
 My project has two parts: shared library and executable. The soversion
 of shared library is libxxx.so.1.2.3. Now, the cmakelist.txt of
 executable will check this soversion of shared library as . How do I
 do this checking?
Maybe the solution is here:
http://www.cmake.org/Wiki/CMake/Tutorials/Packaging

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Parameters of functions

2011-05-12 Thread Micha Renner
Am Donnerstag, den 12.05.2011, 17:10 +0200 schrieb Michael Wild:
 I agree, that this behaviour is due the fact that the parameter name
 var hides the parent-scope variable var, but then ${${var}} should
 IMHO result in an error or warning message. Essentially, what this does
 inside the function is
 
 set(var var)
 
 which is hardly ever what is intended. 

Okay, now I understand it.

Thanks very much to all of you!

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Parameters of functions

2011-05-11 Thread Micha Renner
This is funny:
FUNCTION(build var)
MESSAGE(STATUS var:  ${${var}})
ENDFUNCTION(build)

SET(var red blue yellow green)
build(var)

Output:
-- var: var

SET(varX red blue yellow green)
build(varX)
Output:
-- var: redblueyellowgreen

Greetings
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] gobject-introspection

2011-05-06 Thread Micha Renner
Are there any plans to support gobject-introspection?

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] problems with CMAKE_CFG_INTDIR in initial cache

2011-04-04 Thread Micha Renner
Am Montag, den 04.04.2011, 21:22 +0200 schrieb Dominik Szczerba:
 CMAKE_CFG_INTDIR

This value is evaluated by the native build system - this variable is
suitable only for use in command lines that will be evaluated at build
time (after the cmake run).

Please see:
www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_CFG_INTDIR

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] IF Matches

2011-03-03 Thread Micha Renner
Hello,

IF(bgdgbBromNN MATCHES Brom) 
is true,
but
IF(Brom MATCHES bgdgbBromNN) 
is false.

Should be same, or?

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Is there an elegant way to get list of object files participating into a library?

2011-02-28 Thread Micha Renner
Am Sonntag, den 27.02.2011, 21:38 + schrieb Pere Mato Vila:
 Hi,
 
   For the Windows platform  I am generating the .DEF files with all defined 
 symbols to be exported.  For this  I need to get the list of all object files 
 (.obj) participating into a library. The question is whether this list is 
 available knowing the library target name. I can try to construct it staring 
 from the list of sources and try to reverse-engineer the correct suffix 
 replacement and their location in the build tree. But clearly would be better 
 if this is given to me directly. 

May be gendef is an option.

http://sourceforge.net/apps/trac/mingw-w64/wiki/gendef

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to set definitions

2011-02-18 Thread Micha Renner
ADD_DEFINITION sets the definitions for a compiler without target
binding. This means once it is used all subsequent targets and
subdirectories have these definitions
ADD_DEFINITIONS(-DHAVE_CONFIG_H -DEXCLUDE ALL_PINGUINS)

COMPILE_DEFINITIONS is a property which is used frequently with
SET_TARGET_PROPERTIES. Here the definitions are set for the target only.
SET_TARGET_PROPERTIES(_targetname PROPERTIES
COMPILE_DEFINITIONS HAVE_CONFIG_H;EXCLUDE_ALL_PINGUINS)
No -D, parameters are separated by ;

ADD_DEFINITIONS- and SET_TARGET_PROPERTIES can be mixed, depending what
you want.

Here is an nice typical example:
SET(_definitions G_LOG_DOMAIN=\Gtk\
 GTK_LIBDIR=\${DGTK_LIBDIR}\
 GTK_DATADIR=\${GTK_DATADIR}\
 GTK_DATA_PREFIX=\/${GTK_DATA_PREFIX}\
 GTK_SYSCONFDIR=\${_sysConfDir}\
 GTK_VERSION=\${PACKAGE_VERSION}\
 GTK_BINARY_VERSION=\${GTK_BINARY_VERSION}\
 GTK_PRINT_BACKENDS=\${GTK_PRINT_BACKENDS}\
 GTK_COMPILATION
 GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED
 GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED)

SET_TARGET_PROPERTIES(${_gtkTarget} PROPERTIES
COMPILE_DEFINITIONS ${_definitions})

CMAKE_REQUIRED_DEFINITIONS is a variable which belongs to the CheckC
command-family, which is important for CTest (Not sure!). See the
documentation there.

Greetings
Micha



Am Donnerstag, den 17.02.2011, 15:30 -0200 schrieb Felipe Ferreri
Tonello:
 Hello guys,
 
 What's the difference to use add_definitions(...), CMAKE_REQUIRED_DEFINITIONS 
 and COMPILE_DEFINITIONS ??
 
 I've read the documentation but I need some examples and simple discription 
 how to use it.
This is a contradiction in itself.

 GTK_PRINT_PREVIEW_COMMAND=
 - Felipe
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] find_package, quiet and yyyConfig files

2011-02-10 Thread Micha Renner
There is a library, which is described with these TLIBConfig.cmake,
TLIBConfigVersion.cmake files (The version of the library is 2.1).

The library is used by
FIND_PACKAGE(TLIB 2.30 QUIET)

Is there a way to check the version of the library after FIND_PACKAGE?
E.g., if TLIB_VERSION would have a value, then the library exists, but
has the wrong version.

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] find_package, quiet and yyyConfig files

2011-02-10 Thread Micha Renner
Am Donnerstag, den 10.02.2011, 15:12 +0100 schrieb Michael Hertling:
 AFAICS from the documentation in [1], FIND_PACKAGE() is not obliged to
 set TLIB_VERSION et al. if no acceptable TLIBConfig[Version].cmake has
 been found, and that's quite reasonable: Suppose you've multiple TLIB
 installations, and all of them have inacceptable versions; which one
 would you expect to be mentioned in TLIB_VERSION?

 
 IMO, the best you can do in order to find out an available package's
 actual version after the search for a specific version has failed is:
 
 FIND_PACKAGE(TLIB 2.30 QUIET)
 IF(NOT TLIB_FOUND)
 FIND_PACKAGE(TLIB QUIET)
 # Check actual version.
 ENDIF()
 
 Here, of course, I'm relying on the assumption that a FIND_PACKAGE()
 call without version means that I'm willing to accept any version,
 and that the package's version file behaves accordingly.
But I have the version (TLIB_VERSION) and then I can react. This was a
really good idea. Thank you very much.

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] GTK2 Module

2011-02-10 Thread Micha Renner
In FindGTK2.cmake there are some examples how to use this module

find_package(GTK2 2.6 REQUIRED gtk)

generates:
CMake Warning (dev) at CMakeLists.txt:75 (find_package):
  Policy CMP0011 is not set: Included scripts do automatic cmake_policy
PUSH
  and POP.  Run cmake --help-policy CMP0011 for policy details.  Use
the
  cmake_policy command to set the policy and suppress this warning.

  The included script

/usr/local/share/cmake-2.8/Modules/FindGTK2.cmake

  affects policy settings.  CMake is implying the NO_POLICY_SCOPE option
for
  compatibility, so the effects are applied to the including context.
This warning is for project developers.  Use -Wno-dev to suppress it.

same with:
find_package(GTK2 2.8 COMPONENTS gtk gtkmm)

Is there a way to use this module, out of the box, without this
complicated message?

GTK Version 3 will come, sooner or later. Maybe one can drop the major
version number. 
E.g GTK2_INCLUDE_DIR etc...

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] New warnings in CMake 2.8.4-rc2

2011-02-02 Thread Micha Renner
Am Mittwoch, den 02.02.2011, 12:00 +0100 schrieb Emmanuel Blot:
 Hello,
 
 How to disable the new warnings CMake 2.8.4-rc2 emits, such as the
 following ones?

I support this question too.

There should be a way to switch off this feature of CMake, especially
when variables are used uninitialized.

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] New warnings in CMake 2.8.4-rc2

2011-02-02 Thread Micha Renner
Am Mittwoch, den 02.02.2011, 09:49 -0500 schrieb Brad King:
 On 2/2/2011 9:21 AM, Michael Jackson wrote:
  On Feb 2, 2011, at 9:08 AM, Brad King wrote:
  
  cmake --help:
  
   --warn-uninitialized= Warn about uninitialized values.
   --warn-unused-vars  = Warn about unused variables.
   --no-warn-unused-cli= Don't warn about command line options.
  
  So does the -warn-uninitialized ENABLE or DISABLE the new warnings?
 
 It does what the documentation says (enable).  Bill's answer
 was incorrect unless he was referring to something else.  There
 are three cases:
 
 - User passes -DCMAKE_BIULD_TYPE on the command line and gets a warning
 because it is misspelled and therefore unused.  This is ON by default
 but can be disabled with --no-warn-unused-cli, or by *gasp* not passing
 unused variables.
 
 - Project does ${UNINITIALIZED_VAR} and nothing happens, but it can
 be a warning if --warn-uninitialized is passed.  This is intended to
 help cleanup project source code.
 
 - Project does set(VAR_THAT_IS_NOT_USED 1) and nothing happens, but
 can be a warning if --warn-unused-vars is passed.
Yes, this is my solution, but is it in this form documented?

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] add_custom_command and generated true

2011-01-25 Thread Micha Renner
Recently, I learned that ADD_CUSTOM_COMMAND generated the property
GENERATED TRUE for the generated file.

Somehow I have trouble in this situation:

In a top level CMakeLists file a source file, blue.c, is generated. This
file should be used in a subdirectory with its own CMakeLists file.

Running CMake generates the message: cannot find blue.c etc...

Okay, the information, that this is a generated sourcefile is, maybe,
lost on the transition to the subdirectory.

So, I inserted in the CMakeLists file of subdirectory the line:
SET_SOURCE_FILES_PROPERTIES(blue.c PROPERTIES GENERATED TRUE)
which generates the make message
No rule to build target subdirectory/blue.c

I changed the inserted line (see above) to...
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/blue.c
 PROPERTIES GENERATED TRUE) 
... which is okay.

= Two question

- Is it general true, that properties are lost on transition to a
  subdirectory?
- In which cases is it absolute necessary to work with absolute paths
  and SET_SOURCE_FILES?

In the appendix is a small example (Unix only)

Greetings

Micha





CMakeQuest.tar.gz
Description: application/compressed-tar
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] add_custom_command and generated true

2011-01-25 Thread Micha Renner
Am Dienstag, den 25.01.2011, 15:34 +0100 schrieb Michael Hertling:
 On 01/25/2011 10:17 AM, Micha Renner wrote:
  Recently, I learned that ADD_CUSTOM_COMMAND generated the property
  GENERATED TRUE for the generated file.
  
  Somehow I have trouble in this situation:
  
  In a top level CMakeLists file a source file, blue.c, is generated. This
  file should be used in a subdirectory with its own CMakeLists file.
  
  Running CMake generates the message: cannot find blue.c etc...
  
  Okay, the information, that this is a generated sourcefile is, maybe,
  lost on the transition to the subdirectory.
 
 The documentation of SET_SOURCE_FILES_PROPERTIES() states
 
 Source file properties are visible only to targets added in the same
 directory (CMakeLists.txt).
 
 and GENERATED is a source file property, so it's not amazing that the
 subdirectory's CMakeLists.txt doesn't recognize blue.c as generated,
 even if the property is imposed by ADD_CUSTOM_COMMAND(OUTPUT ...).
 
  So, I inserted in the CMakeLists file of subdirectory the line:
  SET_SOURCE_FILES_PROPERTIES(blue.c PROPERTIES GENERATED TRUE)
  which generates the make message
  No rule to build target subdirectory/blue.c
 
 Explicitly setting the GENERATED property here quiets CMake, but the
 subdirectory's Makefile won't have a rule to generate blue.c because
 the custom command is defined in the top-level CMakeLists.txt; from
 the documentation of ADD_CUSTOM_COMMAND():
 
 A target created in the same directory (CMakeLists.txt file)
 that specifies any output of the custom command as a source file
 is given a rule to generate the file using the command at build time.
 
 So, the build will fail with the mentioned error message from make.
 
  I changed the inserted line (see above) to...
  SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/blue.c
   PROPERTIES GENERATED TRUE) 
  ... which is okay.
 
 AFAICS from your example, this works by accident: The custom target is
 processed before make descends to the subdirectory, so blue.c already
 exists when the cTest target gets built, and CMake is happy because
 blue.c is marked as GENERATED in that *directory's* CMakeLists.txt.
 Remove the ALL flag from the ADD_CUSTOM_TARGET() command, and you
 will probably see your example fail, regardless if and how the
 GENERATED property is set.
 
  = Two question
  
  - Is it general true, that properties are lost on transition to a
subdirectory?
 
 This is true for the source file properties and for some directory
 properties like EXCLUDE_FROM_ALL; the latter is not inherited by sub-
 directories, but the COMPILE_DEFINITIONS directory property, e.g., is.
 
  - In which cases is it absolute necessary to work with absolute paths
and SET_SOURCE_FILES?
 
 IMO, the rule of thumb is: Use absolute paths where the behavior
 for relative paths is not specified or not appropriate. E.g.,
 
 ADD_CUSTOM_COMMAND(OUTPUT blue.c ...)
 
 will generate ${CMAKE_CURRENT_BINARY_DIR}/blue.c, but which directory
 
 SET_SOURCE_FILES_PROPERTIES(blue.c PROPERTIES ...)
 
 bases on? For the GENERATED property, CMAKE_CURRENT_BINARY_DIR would be
 reasonable, but for the LANGUAGE property, CMAKE_CURRENT_SOURCE_DIR
 might suit better. Thus, SET_SOURCE_FILES_PROPERTIES() should be
 invoked with absolute paths only.

Thanks, these are understandable explanations. Very good.

 
 BTW, you shouldn't do in-source builds, and do not write to the source
 directories; it's bad style, doesn't play nicely with version control
 systems and might be the reason for some quite subtle problems.
I know, but sometimes you have a given structure, which you can't
change. The above example is the result of a move-over of glibmm. Here
many src-files are generated in-source and these files already exists.
If I install the CMake scripts, I could remove the generated source
files, but then I need a list of the generated files in my installation
script and this is want I don't want.

Greetings Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to make a ProjectConfig.cmake

2011-01-20 Thread Micha Renner
Am Donnerstag, den 20.01.2011, 15:36 -0500 schrieb Brad King:
 On 01/20/2011 01:36 PM, Alexander Neundorf wrote:
  On Thursday 20 January 2011, Brad King wrote:
  This all has been documented on the Wiki for years:
 
http://www.cmake.org/Wiki/CMake_2.6_Notes
 
  It is more of a tutorial/reference format than an example/template though.
  
  Yes, it's just hard to find under the link CMake 2.6 Notes when looking 
  for 
  information on how to create a Config-file.
 
 I've re-organized the pages a bit to address this.  See if you can
 find it starting here:
 
   http://www.cmake.org/Wiki/CMake#Basic_Introductions
 
Impossible. What is the headline now?

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Bug #11258

2011-01-14 Thread Micha Renner
They have a question:
https://connect.microsoft.com/VisualStudio/feedback/details/634469/vs-2010-yields-blocking-error-dialog-when-a-macro-tries-to-stop-the-build-vs-2008-did-not

Maybe you can answer.

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FLTKConfig.cmake on Microsoft Windows

2010-12-30 Thread Micha Renner
Am Mittwoch, den 29.12.2010, 20:03 +0100 schrieb Julia Jacobson:
 Thanks for your answer. The file FindFLTK.cmake exists within my CMake 
 installation, but I still get an error message:
 CMake Error at C:/Program Files/CMake 
 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 
 (MESSAGE):
 Could NOT find FLTK (missing: FLTK_LIBRARIES FLTK_FLUID_EXECUTABLE)
 This is probably due to the fact that I haven't indicated anywhere where 
 to find my FLTK installation (i.e. C:\Program Files\fltk-1.1.10).
 
Actually the module file (here FindFLTK) should find the libraries on
any platforms, but in this case...

Before FIND_PACKAGE(FLTK REQUIRED) insert:

SET(FLTK_DIR C:/Program Files/fltk-1.1.10) # NO backslash!

If you did not install fluid)
SET(FLTK_SKIP_FLUID TRUE)

FIND_PACKAGE(...

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FLTKConfig.cmake on Microsoft Windows

2010-12-30 Thread Micha Renner
Am Donnerstag, den 30.12.2010, 11:01 +0100 schrieb Julia Jacobson:

 What grieves me is that the CMake code I had prepared in linux looked 
 really nice (without any absolute paths and so on), but the file for 
 Windows doesn't.
I think, the problem with FindFLTK is, that it has never been tested on
Windows. If you take a look at FindFLTK you will detect the following
lines:
  # if FLTK was not built using CMake
# Find fluid executable.
FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid)

# Use location of fluid to help find everything else.


So on Windows everything is based on finding fluid. If this fails then
the whole detection-mechanism of finding the other components collapse.

 Truth be told, what's the point of using CMake here instead of a 
 Makefile? Simply rewriting the build script doesn't cause that more work 
 either.
Of course not. A CMake-script should run everywhere without changes.
(I can hear my teacher, I know). A well written find module should take
into account that it runs on different platforms with different
locations of the libraries. If all this fails, it should be allowed that
the user can give a hint where to search. (That was the reason for
FLTK_DIR).

 Would it help to add the FLTK directory to the Windows PATH variable?
In this case not. FindFLTK does not use it.

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FLTKConfig.cmake on Microsoft Windows

2010-12-29 Thread Micha Renner
Am Mittwoch, den 29.12.2010, 12:13 +0100 schrieb Julia Jacobson:
 Hello everybody out there using CMake,
 
 A project I would like to build with CMake uses FLTK.
 The CMakeLists.txt file references to FLTK:
 ...
 SET(FLTK_INCLUDE_DIR C:/Programs/fltk)
 FIND_PACKAGE(FLTK REQUIRED)

 ...
 However, CMake tells me that I can't find the file FLTKConfig.cmake, 
 which indeed doesn't exist on my Windows installation.
If CMake cannot find FindFLTK.cmake or FLTKConfig.cmake take a look into
C:\Program Files\CMake 2.8\share\cmake-2.8\Modules or where ever you
have installed CMake. Here you should find FindFLTK.cmake. If this file
exists and CMake cannot find it, then you have an installation problem
with CMake.

 Do I really need this file, where can I get it and how do use it 
 together with CMake.
You need FindFLTK.cmake or FLTKConfig.cmake because CMake loads this
file during the call of FIND_PACKAGE. You should have FindFLTK.cmake
already, see above.

 Moreover, is there a way to make the value of FLTK_INCLUDE_DIR more 
 portable? My CMakeLists.txt file like it is would obviously not work
 under linux.
Out-comment the line: SET(FLTK_INCLUDE_DIR C:/Programs/fltk). It is not
an good idea to set FLTK_INCLUDE_DIR in a CMakeLists.txt file, since
FLTK_INCLUDE_DIR is defined and set in FindFLTK.cmake or
FLTKConfig.cmake

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CMAKE_SHARED_LIBRARY_PREFIX

2010-12-28 Thread Micha Renner
Hello,

I always thought that CMAKE_SHARED_LIBRARY_PREFIX should have the value
lib (Linux). On my system it is blank. Is there a specific reason for
that?

Greetings
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMAKE_SHARED_LIBRARY_PREFIX

2010-12-28 Thread Micha Renner
Am Dienstag, den 28.12.2010, 07:46 -0500 schrieb David Cole:
 What's the context of your question?
 
 
 When processing a CMakeLists file, on Linux, the typical value is
 lib.
Aha.

The following small script...

PROJECT(T)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)

MESSAGE(STATUS  CMAKE_HOST_SYSTEM  ${CMAKE_HOST_SYSTEM})
MESSAGE(STATUS  CMAKE_SYSTEM_NAME  ${CMAKE_SYSTEM_NAME})
MESSAGE(STATUS  CMAKE_HOST_SYSTEM_PROCESSOR 
${CMAKE_HOST_SYSTEM_PROCESSOR})
MESSAGE(STATUS  CMAKE_SYSTEM_PROCESSOR 
${CMAKE_SYSTEM_PROCESSOR})
MESSAGE(STATUS  CMAKE_LINK_LIBRARY_SUFFIX 
${CMAKE_LINK_LIBRARY_SUFFIX})
MESSAGE(STATUS  CMAKE_SHARED_LIBRARY_SUFFIX 
${CMAKE_SHARED_LIBRARY_SUFFIX})
MESSAGE(STATUS  CMAKE_SHARED_LIBRARY_PREFFIX 
${CMAKE_SHARED_LIBRARY_PREFFIX})
MESSAGE(STATUS  CMAKE_STATIC_LIBRARY_SUFFIX 
${CMAKE_STATIC_LIBRARY_SUFFIX})
MESSAGE(STATUS  CMAKE_STATIC_LIBRARY_PREFFIX 
${CMAKE_STATIC_LIBRARY_PREFFIX})
MESSAGE(STATUS  CMAKE_FIND_LIBRARY_PREFIXES 
${CMAKE_FIND_LIBRARY_PREFIXES})
MESSAGE(STATUS  CMAKE_FIND_LIBRARY_SUFFIXES 
${CMAKE_FIND_LIBRARY_SUFFIXES})
MESSAGE(STATUS  CMAKE_CURRENT_BINARY_DIR 
${CMAKE_CURRENT_BINARY_DIR})
MESSAGE(STATUS  CMAKE_CFG_INTDIR:  ${CMAKE_CFG_INTDIR})
MESSAGE(STATUS  CMAKE_BUILD_TYPE:  ${CMAKE_BUILD_TYPE})
MESSAGE(STATUS  CMAKE_MODULE_PATH:  ${CMAKE_MODULE_PATH})
MESSAGE(STATUS  CMAKE_COMMAND: ${CMAKE_COMMAND})  
  
# 
# Test area path
# 
INCLUDE(CMakeGlobal.cmake) 
INCLUDE(ProcessorCount)
ProcessorCount(num)
MESSAGE(STATUS --  ${num})

# 
# Source - elements
# ---
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
ADD_EXECUTABLE(cTest CTest.c)

...generates this output:
--  CMAKE_HOST_SYSTEM Linux-2.6.35-22-generic
--  CMAKE_SYSTEM_NAME Linux
--  CMAKE_HOST_SYSTEM_PROCESSOR i686
--  CMAKE_SYSTEM_PROCESSOR i686
--  CMAKE_LINK_LIBRARY_SUFFIX 
--  CMAKE_SHARED_LIBRARY_SUFFIX .so
--  CMAKE_SHARED_LIBRARY_PREFFIX 
--  CMAKE_STATIC_LIBRARY_SUFFIX .a
--  CMAKE_STATIC_LIBRARY_PREFFIX 
--  CMAKE_FIND_LIBRARY_PREFIXES lib
--  CMAKE_FIND_LIBRARY_SUFFIXES .so.a
--  CMAKE_CURRENT_BINARY_DIR /home/gildemeister/work-c/T/CMake
--  CMAKE_CFG_INTDIR: .
--  CMAKE_BUILD_TYPE: Debug
--  CMAKE_MODULE_PATH: 
--  CMAKE_COMMAND:/usr/local/bin/cmake
-- CMake's build type is: Debug
-- -- 2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gildemeister/work-c/T/CMake

As you can see CMAKE_SHARED_LIBRARY_PREFFIX is blank.

Ubuntu 9/10; CMake 2.8.3.

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMAKE_SHARED_LIBRARY_PREFIX

2010-12-28 Thread Micha Renner
Am Dienstag, den 28.12.2010, 08:51 -0500 schrieb David Cole:
 CMAKE_SHARED_LIBRARY_PREFIX only has one F

Shame on me. 

Nevertheless, thank you.

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Visual Studio 2010 Generator Missing?

2010-12-28 Thread Micha Renner

 Just a small piece of feedback. All the other Visual Studio generators are 
 in order, ie, VS 6, VS 7, VS 8, VS 9 so it made sense to look for VS 10 
 below VS 9. Was there a specific reason for putting VS 10 above VS 6 and thus 
 out of order?  
The only reason I can think is that VS 10 starts with 1.

For example:  
1
11
111
2
3
4

Greetings
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Dependency rule not included

2010-12-08 Thread Micha Renner
Am Mittwoch, den 08.12.2010, 14:55 +0100 schrieb Vivien Delmon:
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 ADD_CUSTOM_COMMAND(OUTPUT toto.h toto.c
 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/create_totoc_totoh.sh
 )
SET_SOURCE_FILES_PROPERTIES(toto.h toto.c PROPERTIES GENERATETED TRUE)

See:
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set_source_files_properties
and:
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_sf:GENERATED


 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
 ADD_LIBRARY(titi toto.c)
 ADD_LIBRARY(tata tata.c) 

Greetings 
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] find_package with ###Config.cmake

2010-12-06 Thread Micha Renner
Andreas, Michael - thanks, you helped me lot.

Greetings
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] find_package with ###Config.cmake

2010-12-03 Thread Micha Renner
Am Freitag, den 03.12.2010, 08:45 +0100 schrieb Andreas Pakulat:
 On 03.12.10 07:11:23, Micha Renner wrote:
  There is a small library TLib which is installed like this
  
  Install the project...
  -- Install configuration: Debug
  -- Installing: /usr/local/lib/libTLibd.so
  -- Installing: /usr/local/lib/TLib/TLibExport.cmake
  -- Installing: /usr/local/lib/TLib/TLibExport-debug.cmake
  -- Installing: /usr/local/include/TLib/cmFile.h
  -- Installing: /usr/local/lib/TLib/TLIBConfig.cmake
  -- Installing: /usr/local/lib/TLib/TLIBConfigVersion.cmake
  
  The CMakeLists file for the application program has the following line
  to find the library
  
  FIND_PACKAGE(TLIB)
  
  This works, surprisingly, very good. No CMAKE_MODULE_PATH, no TLIB_DIR
  in this case. 
  
  But...
  
  If I call FIND_PACKAGE with version:
  FIND_PACKAGE(TLIB 1.3)
  
  I get the std-warning:
  -
  CMake Warning at TestDLL/CMakeLists.txt:20 (FIND_PACKAGE):
Could not find module FindTLIB.cmake or a configuration file for
  package
TLIB.
  
Adjust CMAKE_MODULE_PATH or TLIB_DIR...
  -
  
  
  Why can't CMake find the TLIBConfig file, if FIND_PACKAGE is called with
  version and TLIB_DIR is not set? 
 
 The problem might not be finding the Config file, but rather that the
 ConfigVersion file doesn't set the VERSION_COMPATIBLE or VERSION_EXACT
 variables. Or maybe it even sets the VERSION_UNSUITABLE to indicate that
 the installed version of TLib doesn't match the version you request.
 
 Unfortunately cmake currently cannot seem to distinguish between these
 two cases (non-matching version vs. no config-file found), hence it
 produces the same message in both cases.
 

This was my first impression, so I used the ConfigVersion file of
http://www.cmake.org/Wiki/CMake_2.6_Notes to be on the safe side.
SET(PACKAGE_NAME TLib)
SET(PACKAGE_VERSION 1.3)
IF(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 1)
SET(PACKAGE_VERSION_COMPATIBLE 1)
IF(${PACKAGE_FIND_VERSION_MINOR} EQUAL 3)
SET(PACKAGE_VERSION_EXACT 1)# exact match for version 1.3
ENDIF(${PACKAGE_FIND_VERSION_MINOR} EQUAL 3)
ENDIF(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 1)

But this also does not work.

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] find_package with ###Config.cmake

2010-12-03 Thread Micha Renner

 Meanwhile, with 2.8.3 to be exact, the warning message issued by CMake
 if a version file is found but the requested version doesn't suit is:
 
 Could not find a configuration file for package ... that is compatible
 with requested version 
 
 The following configuration files were considered but not accepted:
 
   ..., version: ...
 
 So, Micha, which CMake version do you use? If it's not 2.8.3 could you
 give that a try and report the message if the problem still persists?
 Additionally, the package_CONSIDERED_{CONFIGS,VERSIONS} variables
 would be of special interest, see dfe9c95.
 
On Linux, I use 2.8.0, what to be is the problem. 

So I switched to a Windows machine, which has 2.8.3. The warning I
mentioned above disappeared.

But a call of 
FIND_PACKAGE(TLIB 1.3)
results in this message:

CMake Error at TestDLL/CMakeLists.txt:19 (FIND_PACKAGE):
Could not find a configuration file for package TLIB that is
compatible
with requested version 1.3.
  
The following configuration files were considered but not accepted:
  
C:/usr/local/lib/TLib/TLIBConfig.cmake, version: 1.3
  
 
-- TLIB_CONSIDERED_VERSIONS: 1.3
-- TLIB_CONSIDERED_CONFIGS: C:/usr/local/lib/TLib/TLIBConfig.cmake

Since my knowledge is based on CMake 2.6 Notes, there are some more
questions.

The ###ConfigVersion.cmake is still necessary?

If so, ###ConfigVersion.cmake should have at least the following
content?

SET(PACKAGE_NAME TLib)
SET(PACKAGE_VERSION 1.3)
IF(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 1)
SET(PACKAGE_VERSION_COMPATIBLE 1)
IF(${PACKAGE_FIND_VERSION_MINOR} EQUAL 3)
SET(PACKAGE_VERSION_EXACT 1)# exact match for version 1.3
ENDIF(${PACKAGE_FIND_VERSION_MINOR} EQUAL 3)
ENDIF(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 1)


Greetings

Micha




___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] find_package with ###Config.cmake

2010-12-02 Thread Micha Renner
There is a small library TLib which is installed like this

Install the project...
-- Install configuration: Debug
-- Installing: /usr/local/lib/libTLibd.so
-- Installing: /usr/local/lib/TLib/TLibExport.cmake
-- Installing: /usr/local/lib/TLib/TLibExport-debug.cmake
-- Installing: /usr/local/include/TLib/cmFile.h
-- Installing: /usr/local/lib/TLib/TLIBConfig.cmake
-- Installing: /usr/local/lib/TLib/TLIBConfigVersion.cmake

The CMakeLists file for the application program has the following line
to find the library

FIND_PACKAGE(TLIB)

This works, surprisingly, very good. No CMAKE_MODULE_PATH, no TLIB_DIR
in this case. 

But...

If I call FIND_PACKAGE with version:
FIND_PACKAGE(TLIB 1.3)

I get the std-warning:
-
CMake Warning at TestDLL/CMakeLists.txt:20 (FIND_PACKAGE):
  Could not find module FindTLIB.cmake or a configuration file for
package
  TLIB.

  Adjust CMAKE_MODULE_PATH or TLIB_DIR...
-


Why can't CMake find the TLIBConfig file, if FIND_PACKAGE is called with
version and TLIB_DIR is not set? 

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] set CMAKE_INSTALL_PREFIX in CMakeLists

2010-11-23 Thread Micha Renner
Am Dienstag, den 23.11.2010, 14:01 +0100 schrieb tomas...@sbc.su.se:
 Dear Cmake users,
 
 1) I am trying to set CMAKE_INSTALL_PREFIX in the CMakeLists file with
 SET(CMAKE_INSTALL_PREFIX, my/path)
 ^
 No comma!

greetings
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] set CMAKE_INSTALL_PREFIX in CMakeLists

2010-11-23 Thread Micha Renner
Am Dienstag, den 23.11.2010, 15:01 +0100 schrieb Michael Wild:
 On 11/23/2010 02:33 PM, Micha Renner wrote:
  Am Dienstag, den 23.11.2010, 14:01 +0100 schrieb tomas...@sbc.su.se:
  Dear Cmake users,
 
  1) I am trying to set CMAKE_INSTALL_PREFIX in the CMakeLists file with
  SET(CMAKE_INSTALL_PREFIX, my/path)
   ^
   No comma!
  
  greetings
  Micha
 
 And *NEVER EVER* set CMAKE_INSTALL_PREFIX in your CMakeLists.txt file.
 That is a user-setting and you will make people angry at you if you
 override their choice in your code.

Okay, then this might help:

IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH Foo install
 prefix FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

Of course, this is not my idea. It had someone from kitware, I don't
remember who it was.


greetings
Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Run compiler through another tool?

2010-11-17 Thread Micha Renner
Am Mittwoch, den 17.11.2010, 15:07 +0530 schrieb Hariharan:
 Is it possible to run the compiler and linker through another command,
 say time or a custom script? In other words, I want the compile and
 link steps to run command gcc and command ld.
 
In this case you have to work with a combination of the CMake commands
add_custom_command, add_custom_target, add_dependencies.

As an idea: Maybe you can find CMake-projects which work with C#, which
is currently, as much as I know, not supported by CMake.
They do pretty much the same, what you want to do. (Of course there are
principal differences).

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.3 available for download

2010-11-04 Thread Micha Renner
Unpacking cmake-2.8.3.tar.gz, cmake-2.8.3-Linux-i386.tar.gz results in
the following error message of the archive manager:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

cmake-2.8.3-Linux-i386.tar.Z is ok.

Greetings
Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.3 available for download

2010-11-04 Thread Micha Renner
Am Donnerstag, den 04.11.2010, 08:38 +0100 schrieb Eric Noulard:
 2010/11/4 Micha Renner micha.ren...@t-online.de:
  Unpacking cmake-2.8.3.tar.gz, cmake-2.8.3-Linux-i386.tar.gz results in
  the following error message of the archive manager:
  gzip: stdin: not in gzip format
  tar: Child returned status 1
  tar: Error is not recoverable: exiting now
 
 Those are ok for me.
 Don't you have a download issue ? (which may be uncompressing on the fly)?
I don't think so. Firefox downloads the file and starts File Roller
then.

 
 Could you try
 $ wget http://www.cmake.org/files/v2.8/cmake-2.8.3-Linux-i386.tar.gz
 then
 $ file cmake-2.8.3-Linux-i386.tar.gz
 and
 $ tar ztvf cmake-2.8.3-Linux-i386.tar.gz
 
This is ok.

Greetings
Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] ADD_TEST and WORKING_DIRECTORY

2010-10-20 Thread Micha Renner
Is there a way to specify a WORKING_DIRECTORY for ADD_TEST, similar
ADD_CUSTOM_COMMAND?

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.3-rc1 ready for testing!

2010-09-19 Thread Micha Renner
Here is a small one.

INSTALL(FILES ${CMAKE_BINARY_DIR}/CTest.conf DESTINATION /usr/local)

always results in this warning:


1  -- Install configuration: Debug
1  CMake Warning (dev) at cmake_install.cmake:31 (list):
1Syntax error in cmake code at
1  
1  C:/work-c/T/CMake/cmake_install.cmake:32
1  
1when parsing string
1  
1  /usr/local\CTest.conf
1  
1Invalid escape sequence \C
1  
1Policy CMP0010 is not set: Bad variable reference syntax is an
error.  Run
1cmake --help-policy CMP0010 for policy details.  Use the
cmake_policy
1command to set the policy and suppress this warning.
1  This warning is for project developers.  Use -Wno-dev to suppress
it.
1  -- Installing: /usr/local/CTest.conf

(CMake 2.8.3rc1, VS 2010Express)

Greetings

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.3-rc1 ready for testing!

2010-09-17 Thread Micha Renner

  http://public.kitware.com/Bug/view.php?id=3796 )
Oh thank you, that should be the next topic (long awaited) what I wanted
to test. Now it has to wait. I didn't realize this correlation.
 
 
 In the meantime, to get rid of the problem for now, turn the new
 feature off. In the top level CMakeLists.txt file, add:
 
 
   set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
Ok.


 I assume you have to try to build CMake source code, with a CMake
 2.8.3 using a Visual Studio Express Edition to see the problem. Please
 correct me if I have something wrong with that assumption...
 
Yes.

Have a nice weekend 

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.3-rc1 ready for testing!

2010-09-16 Thread Micha Renner
I get the message CMakePredefinedTarget not available and then VS
message: Cannot load CMakePredefinedTarget project.

What does this mean for the work with CMake and VS2010 Express?

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Problem with Visual Studio 2008 Express and Windows 7

2010-09-14 Thread Micha Renner
There were and there are problems with CMake and the Visual Studio
Express Versions.
See: http://www.cmake.org/pipermail/cmake/2010-May/036962.html (macros)

I use the 2010 Express Version, which works astonishingly good. There
are still some minor problems (see
http://www.cmake.org/pipermail/cmake/2010-June/037531.html), but for
small projects it is ok.
So I recommend, you switch to 2010er version and use the 2.8.2 version
of CMake.

Greetings

Micha




___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Anjuta

2010-08-19 Thread Micha Renner
Does CMake support Anjuta?

Greetings
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.2 RC1 - Visual Studio Express

2010-06-21 Thread Micha Renner
Am Freitag, den 18.06.2010, 10:46 -0400 schrieb David Cole:


 
 
 I am guessing (hopefully you will confirm) that you are using the VS
 Express 2010 version? (As opposed to an earlier version of VS
 Express...?)
Yes, VS Express 2010 only.
 
 
 We fixed an issue that we reproduced using another source tree, and
 pushed the fix to CMake 'next' last night.
 
 
 Could you try the nightly installer found here:
 http://cmake.org/files/vCVS/cmake-2.8.1.20100617-gd2c75bd-win32-x86.exe
I installed it.
 
 
 And let us know if that fixes this issue for you?

Yes, excellent, these fixes work for me, but may not for you.

If you delete the content of the build directory,
run the gui-cmake version,
starts VS Express,
hit the F7-key,
then CMake rerun with the following message:
CMake is re-running because C:\Program Files\CMake 2.8\CMakeFiles
\generate.stamp dependency file is missing.
This happens only, if the contents of build directory is deleted.

As I said in one of my posts last week, I appreciate this, because it
simplifies the search for MS-libs/headers.

Greetings
Micha





___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.2 RC1 - Visual Studio Express

2010-06-16 Thread Micha Renner
Am Mittwoch, den 16.06.2010, 06:56 -0400 schrieb David Cole:
 On Wed, Jun 16, 2010 at 1:26 AM, Micha Renner
 micha.ren...@t-online.de wrote:
 There still some problems with the Express version of VS
 I started the gui-version of CMake and generated the solution
 files
 (empty build directory). No errors.
 
 First run in the IDE generates a lot of CMake errors (see
 appendix).
 
 
 CMake should not have to re-run during a build like this... 
Oh no, this is exactly what I need. See my posts yesterday.

 Is your project available as open source so that we can download it
 and try it here? Or could you send me a zip of your source tree
 off-list, if possible? 
Done

 There must be something else going on with the CMake files in this
 project to see a result like this.
 
 
  
 Another hit on the F7 key: Most errors are gone.
 Okay, I can live with this, others may be not.
 
 A bad point is what happens, if there is change in the script
 files.
 - the IDE saves all files (ok)
 - CMake starts (ok)
 - the compiler/linker starts and works with the old solution
 files
 - the new generated solution files are loaded in the IDE (too
 late).
 
 The problems with the filter-files are gone, very good, but
 there are
 still the problems with the reloading of solution files if
 they are not
 changed. I know this is an old problem, but it still exists.
 
 
 Since Visual Studio Express does not support macros, the
 auto-reload-during-build macros that CMake supplies are not involved
 in this scenario. Because of this fact, the workflow of staying in
 the native build tool after the first CMake run is never going to
 work well with the Express editions of VS. This old problem is still
 going to exist, and it's just going to get older.
Okay, now I understand. We have had this point alredy, but now it is
clear.
 
 
 Therefore, I would strongly recommend exiting VS Express prior to
 running CMake, running cmake or cmake-gui standalone without VS
 Express running, and then re-launching VS Express to build.
This is an emergency nail only, but it is okay.
 
 
 Or: upgrade to a paid version of VS so that the macros have a chance
 to work.
I think there will be more Express users in the future. 

Greetings

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] The find_xxx family and VS

2010-06-15 Thread Micha Renner
It seems, that CMake can detect the MSVC specific headers and libraries
only, if it runs within Visual Studio.

For example:
FIND_FILE(STD_FILE stdio.h),
FIND_PATH(STD_PATH stdio.h) or
FIND_LIBRARY(LIB_PATH comctl32)

results in NOT-FOUND, if CMake is run outside the IDE with an empty
Build-Directory. 

This means the first run of the compiler/linker always fails, since
CMake regenerates the solution-/config-files only if there is a change
in the script/config files inside VS.

This always leads to complex instructions for third-party users who just
want to build the programs/libraries, like this.
After you have build the solution files with cmake-gui:
- open VS, 
- open the project
- open the Top-level-CMakeList.txt file
- Hit a space in an empty line
- Rebuild the project.

Is there a better foolproof method to solve this.

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] The find_xxx family and VS

2010-06-15 Thread Micha Renner
Am Dienstag, den 15.06.2010, 14:12 +0200 schrieb Micha Renner:
 It seems, that CMake can detect the MSVC specific headers and libraries
 only, if it runs within Visual Studio.
 
 For example:
 FIND_FILE(STD_FILE stdio.h),
 FIND_PATH(STD_PATH stdio.h) or
 FIND_LIBRARY(LIB_PATH comctl32)
 
 results in NOT-FOUND, if CMake is run outside the IDE with an empty
 Build-Directory. 
 
 This means the first run of the compiler/linker always fails, since
 CMake regenerates the solution-/config-files only if there is a change
 in the script/config files inside VS.
 
 This always leads to complex instructions for third-party users who just
 want to build the programs/libraries, like this.
 After you have build the solution files with cmake-gui:
 - open VS, 
 - open the project
 - open the Top-level-CMakeList.txt file
 - Hit a space in an empty line
 - Rebuild the project.
 
 Is there a better foolproof method to solve this.
cmake-2.8.2-rc1, a very good solution. Just in time, thanks

Micha

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CMake 2.8.2 RC1 - Visual Studio Express

2010-06-15 Thread Micha Renner
There still some problems with the Express version of VS
I started the gui-version of CMake and generated the solution files
(empty build directory). No errors.

First run in the IDE generates a lot of CMake errors (see appendix).
Another hit on the F7 key: Most errors are gone.
Okay, I can live with this, others may be not.

A bad point is what happens, if there is change in the script files.
- the IDE saves all files (ok)
- CMake starts (ok)
- the compiler/linker starts and works with the old solution files
- the new generated solution files are loaded in the IDE (too late).

The problems with the filter-files are gone, very good, but there are
still the problems with the reloading of solution files if they are not
changed. I know this is an old problem, but it still exists.

Greetings

Micha



FirstIdeRun.pdf
Description: Adobe PDF document
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] VS-C++ Express Version

2010-05-14 Thread Micha Renner
There are some things in the cooperation of CMake and the Visual Studio
Express-version, which which bothers me.

Each change in a CMakeLists.txt file results in a message of VS Express
like this: The filter file of your project changed outside VS! Do you
want reload it?

I could live with this, but this message is presented also for
sub-projects whose CMakeLists.txt file was not changed.

Let say one have a project with 5 sub-projects with one target. A change
of one CMakeLists.txt results in the five-fold display of the message
above plus the display for ALL_BUILD, RUN_TESTS, INSTALL and uninstall.
This means I have to confirm 9 times that I want to reload the filter
file of the projects.

That is too much.

More worse: If the the projects have more then one target, you have to
confirm the reload of the filter files for each target.

Greetings
Micha





___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Visual Studio 2010 Express

2010-05-11 Thread Micha Renner
Am Montag, den 10.05.2010, 12:15 -0400 schrieb Bill Hoffman:
 On 5/10/2010 12:10 PM, Micha Renner wrote:
  Running this CMake script...
 
 For VS 2010 express you should need a fix in git master, and can be 
 fixed for any 2.8.1 install. The fix is to copy the 
 Modules/CMakeVS10FindMake.cmake from git master of CMake into a 2.8.1 
 release tree.
 
 
 Have you done that?
Of course, not.

I replace Modules/CMakeVS10FindMake.cmake with the version from git
master of CMake.

Now it works.

Thank you.

Greetings
Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Visual Studio 2010 Express

2010-05-10 Thread Micha Renner
Running this CMake script...

PROJECT(T)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

INCLUDE(CheckFunctionExists)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckTypeSize)
INCLUDE(CheckSymbolExists)
ENABLE_TESTING()


TRY_RUN(_result
_compileResult 
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMakeCheckFiles/sigAtomic_t.c)
 
SET(_targetname ULS)
SET(_src sigAtomic_t.c)

ADD_EXECUTABLE(${_targetname} ${_src})

...results in these messages:


Check for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- works
Detecting C compiler ABI info
CMake Error: Could not COPY_FILE.
  OutputFile: ''
copyFile:
'C:/work-c/tm/CMake/CMakeFiles/CMakeDetermineCompilerABI_C.bin'

Unable to find executable for try_compile: tried
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/cmTryCompileExec.exe and
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe and
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe.

Detecting C compiler ABI info - done
CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40 (FILE):
  file STRINGS file
  C:/work-c/tm/CMake/CMakeFiles/CMakeDetermineCompilerABI_C.bin cannot
be
  read.
Call Stack (most recent call first):
  C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:71
(CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:1 (PROJECT)


Check for working CXX compiler using: Visual Studio 10
Check for working CXX compiler using: Visual Studio 10 -- works
Detecting CXX compiler ABI info
CMake Error: Could not COPY_FILE.
  OutputFile: ''
copyFile:
'C:/work-c/tm/CMake/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin'

Unable to find executable for try_compile: tried
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/cmTryCompileExec.exe and
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe and
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe.

Detecting CXX compiler ABI info - done
CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40 (FILE):
  file STRINGS file
  C:/work-c/tm/CMake/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin
cannot be
  read.
Call Stack (most recent call first):
  C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:64
(CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:1 (PROJECT)


CMake Error: Unable to find executable for try_run: tried
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/cmTryCompileExec.exe and
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe and
C:/work-c/tm/CMake/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe.
Configuring incomplete, errors occurred!

So, where is my error? I used Windows (Win32 Installer)-Version of CMake

Greetings
Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Find_Library with Windows libs

2010-04-20 Thread Micha Renner
Hello -,

I want to use Msing32-library on Windows
FIND_LIBRARY(MSIMG32_LIBRARY Msimg32)

If I run the cmake-gui it cannot find the library. 
There are no problems if cmake runs inside the visual studio.

Are there some enviroment variables I have to set for the gui-version?

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] I'm confused with Find*.cmake and *-config.cmake

2010-04-19 Thread Micha Renner
Am Montag, den 19.04.2010, 16:07 -0400 schrieb Benoit Thomas:
 Hello,
 
 I'm using an external library which is already compiled. I have wrapped 
 the library in a MyLib.cmake and use it in cmake as an imported library. 
 It works fine, but since the include line uses relative path, it changes 
 from projects to projects and in some case it looks just wrong.
 
 I want to change this to something more like:
 
 find_package (MyLib)
 include (MYLIB_CMAKE_FILE)
 # add_executable and stuff
 target_link_libraries (MyExe MyLib)
 
 However, I'm not sure if I should create a FindMyLib.cmake file or 
 MyLib-config.cmake. Both seems to eventually do the same, but I don't 
 really understand what are the differences.
 
 When I looked at some Find*.cmake file (FindSWIG for example) it has a 
 UseSWIG.cmake file. Syntax looks like what I'm trying to achieve, but 
 the none of the Use* files I've check create imported libray, so I guess 
 this is not the way to go.
 
 In the book, there is an example which seems to do more what I want and 
 use *-config.cmake, which give something like
 
 find_package (MyLib)
 # no include, since the MyLib-config.cmake already took care of the include
 # add_executable and stuff
 target_link_libraries (MyExe MyLib)
 
 Part of what I don't understand is when a user use the find_package 
 command, is he expecting to load a Find* file or a *-config file (or he 
 doesn't care?), and is he expecting a specific behavior from each file, 
 etc, etc... And would it be a surprise for the user if the 
 find_package(MyLib) add a MyLib target into his project ? And is using 
 find_package appropriate for this kind of situation and I got it all 
 wrong :) ?
 
 Bottom line, I'm looking for a way to write my projects so that if 
 someone else with cmake experience look into them, it will feel like 
 common cmake project (if such thing exists) and not something I'm the 
 only one to understand...
 
 (Sorry if this sound confusing)

Here,
http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#How_package_finding_works
 you can also read some statements about Find* and *config files.

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] rename of target on install

2010-03-26 Thread Micha Renner
Am Freitag, den 26.03.2010, 08:33 +0100 schrieb Michael Wild:
 On 25. Mar, 2010, at 23:41 , Hai Nguyen wrote:
 
  Hi all,
  
  Is there a way for me to rename the executable during the install? I'm using
  the same CMakeList.txt to build several versions and I'd like to install
  them to different directories but with the version number stripped off of
  the executable.
  
  Thanks,
  - Hai
 
 I don't think there is a way of doing that. But what you can do is setting 
 the OUTPUT_NAME and RUNTIME_OUTPUT_DIRECTORY target properties using the 
 SET_TARGET_PROPERTIES command. This way, you can already reproduce the 
 executable names and directory structure in the build tree.
 
Maybe one can use The PROGRAMS signature of install

install(PROGRAMS files... DESTINATION dir
  [PERMISSIONS permissions...]
  [CONFIGURATIONS [Debug|Release|...]]
  [COMPONENT component]
  [RENAME name] [OPTIONAL])
See:
www.cmake.org/cmake/help/cmake-2-8-docs.html#command:install

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.1 RC 4 is ready to try

2010-03-08 Thread Micha Renner
Am Montag, den 08.03.2010, 09:30 -0500 schrieb Bill Hoffman:
 Micha Renner wrote:
 
  
  Yes, there are no problems with this version.
  
  
  Did you download some other file (perhaps one with Windows line endings)?
  
  It seems so.
  Zip-files have Windows line endings?
  
 http://www.cmake.org/cmake/resources/software.html
 Windows Source (has \r\n line feeds)  cmake-2.8.0.zip
 Unix/Linux Source (has \n line feeds)   cmake-2.8.0.tar.gz
Oh yes, thank you.

I switch frequently my programs between Linux and Windows and I never
realized that there was a problem with \r\n and \n.

But let us stop here, I got the lesson.

Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.1 RC 4 is ready to try

2010-03-07 Thread Micha Renner

 Hi Micha:
 
 What specific URL did you download?

From http://www.cmake.org/files/v2.8/?C=M;O=D
I downloaded the cmake-2.8.1-rc4.zip


 
 My previous data was for 2.8.1-rc3.  Just now I downloaded
 http://www.cmake.org/files/v2.8/cmake-2.8.1-rc4.tar.gz. Bootstrap in source
 tree (and subsequent build, install, and use of CMake-2.8.1-rc4) worked fine
 on Debian Lenny.

Yes, there are no problems with this version.


 
 Did you download some other file (perhaps one with Windows line endings)?

It seems so.
Zip-files have Windows line endings?

Micha




___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.1 RC 4 is ready to try

2010-03-06 Thread Micha Renner
Am Freitag, den 05.03.2010, 22:39 +0100 schrieb Eric Noulard:
 2010/3/5 Bill Hoffman bill.hoff...@kitware.com:
  CMake 2.8.1 RC 4 is ready to try:
 
  http://www.cmake.org/files/v2.8/?C=M;O=D
 
  Please try your projects with it.   If you find any issues, let me know.
  I think this is about it.  So, if I don't hear anything by Monday, this is
  going to be 2.8.1.
 
 Not really a show-stopper since I have no problem using this RC
 but I do have a problem Building it on 2 linux boxes
 (first is Ubuntu 9.10 and the other is Fedora 11) using gcc 4.4.1:

I can confirm this for Ubuntu 9.10.
In the appendix is the generated output.

Micha





gildemeis...@ix4:~/temp/cmake-2.8.1-rc4$ ./bootstrap
-
, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: cc 
C++ compiler on this system is: g++ 
Makefile processor on this system is: make
g++ is GNU compiler
g++ has STL in std:: namespace
g++ has ANSI streams
g++ has streams in std:: namespace
g++ has sstream
g++ has operator!=(string, char*)
g++ has stl iterator_traits
g++ has standard template allocator
g++ has allocator::rebind
g++ does not have non-standard allocator::max_size argument
g++ has stl containers supporting allocator objects
g++ has header cstddef
g++ requires template friends to use 
g++ supports member templates
g++ has standard template specialization syntax
g++ has argument dependent lookup
g++ has struct stat with st_mtim member
g++ has ios::binary openmode
g++ has ANSI for scoping
-
g++  -I/home/gildemeister/temp/cmake-2.8.1-rc4/Bootstrap.cmk 
-I/home/gildemeister/temp/cmake-2.8.1-rc4/Source   
-I/home/gildemeister/temp/cmake-2.8.1-rc4/Bootstrap.cmk -c 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx -o cmake.o
In file included from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmStandardIncludes.h:21,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmSystemTools.h:15,
 from /home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.h:38,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx:12:
/home/gildemeister/temp/cmake-2.8.1-rc4/Bootstrap.cmk/cmConfigure.h:27:24: 
warning: missing terminating  character
/home/gildemeister/temp/cmake-2.8.1-rc4/Bootstrap.cmk/cmConfigure.h:29:1: 
warning: missing terminating  character
In file included from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmStandardIncludes.h:21,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmSystemTools.h:15,
 from /home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.h:38,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx:12:
/home/gildemeister/temp/cmake-2.8.1-rc4/Bootstrap.cmk/cmConfigure.h:29: error: 
missing terminating  character
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx:891: error: missing 
terminating  character
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx:906: error: missing 
terminating  character
In file included from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmStandardIncludes.h:21,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmSystemTools.h:15,
 from /home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.h:38,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx:12:
/home/gildemeister/temp/cmake-2.8.1-rc4/Bootstrap.cmk/cmConfigure.h:28: error: 
expected unqualified-id before numeric constant
In file included from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmStandardIncludes.h:43,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmSystemTools.h:15,
 from /home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.h:38,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx:12:
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stdarg.h:102: error: ‘__gnuc_va_list’ 
does not name a type
In file included from /usr/include/c++/4.4/cwchar:47,
 from /usr/include/c++/4.4/bits/postypes.h:42,
 from /usr/include/c++/4.4/iosfwd:42,
 from /usr/include/c++/4.4/ios:39,
 from /usr/include/c++/4.4/istream:40,
 from /usr/include/c++/4.4/fstream:40,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmStandardIncludes.h:83,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmSystemTools.h:15,
 from /home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.h:38,
 from 
/home/gildemeister/temp/cmake-2.8.1-rc4/Source/cmake.cxx:12:
/usr/include/wchar.h:612: error: ‘__gnuc_va_list’ has not been declared
/usr/include/wchar.h:619: error: ‘__gnuc_va_list’ has not been declared
/usr/include/wchar.h:625: error: ‘__gnuc_va_list’ has not been declared
/usr/include/wchar.h:689: error: ‘__gnuc_va_list’ has not been declared
/usr/include/wchar.h:696: error: 

Re: [CMake] CMake 2.8.1 RC 4 is ready to try

2010-03-06 Thread Micha Renner
Am Samstag, den 06.03.2010, 17:02 +0100 schrieb Eric Noulard:
 2010/3/6 Eric Noulard eric.noul...@gmail.com:
 
  Not really a show-stopper since I have no problem using this RC
  but I do have a problem Building it on 2 linux boxes
  (first is Ubuntu 9.10 and the other is Fedora 11) using gcc 4.4.1:
 
  I can confirm this for Ubuntu 9.10.
  In the appendix is the generated output.
 
  Reading your output, your problem is not the same as mine.
Yes, what I wanted to say: I had a problem building CMake too.
  You did bootstrap when I was using cmake 2.6.4 to compile 2.8.1.
 
 You should try to bootstrap out-of-source:
Of course, but I read autotools in the readMe.txt, so I forgot
out-of-source.
 
 cd /path/to/CMake
 cd ..
 mkdir build
 cd build
 ../CMake/bootstrap
In the directory CMake I did:
../bootstrap
= Same result.

Micha

 
 


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.1 RC 4 is ready to try

2010-03-06 Thread Micha Renner
Am Samstag, den 06.03.2010, 09:08 -0800 schrieb Alan W. Irwin:
 On 2010-03-06 17:02+0100 Eric Noulard wrote:
 
  2010/3/6 Eric Noulard eric.noul...@gmail.com:
 
  Not really a show-stopper since I have no problem using this RC
  but I do have a problem Building it on 2 linux boxes
  (first is Ubuntu 9.10 and the other is Fedora 11) using gcc 4.4.1:
 
  I can confirm this for Ubuntu 9.10.
  In the appendix is the generated output.
 
  Reading your output, your problem is not the same as mine.
  You did bootstrap when I was using cmake 2.6.4 to compile 2.8.1.
 
  You should try to bootstrap out-of-source:
 
  cd /path/to/CMake
  cd ..
  mkdir build
  cd build
  ../CMake/bootstrap
 
 Just to add some more data and opinion to this thread, I always bootstrap in
 a clean source tree (freshly downloaded from kitware) out of inertia. That
 procedure is how I started to build CMake years ago, and it has always
 worked.  In fact, that procedure worked just fine for cmake-2.8.1-rc3 on my
 Debian Lenny platform.  So I suspect Micha Renner didn't have a clean
 bootstrap=source tree or some issue like that.
No, it was clean. I downloaded the compressed file, unpacked, read
readme.txt and started bootstrap. That's all.


 
 If there is no easy clean-tree solution to the issue found by Micha, then
 one rather wild possibility is cmake bootstrap might make configuration
 assumptions that are not compatible with the newer version of g++ which I
 assume Micha has installed on his Ubuntu-9.10 platform.  For what it is
 worth, my Debian Lenny g++ version is
 
 g++ (Debian 4.3.2-1.1) 4.3.2
 
 Ubuntu-9.10 may have a legacy gcc package that Micha could install that
 provides something nearer this version of g++ if using either a clean
 source=bootstrap tree or a clean out-of-source bootstrap tree does not work.
 
 Alan
 __
 Alan W. Irwin
 
 Astronomical research affiliation with Department of Physics and Astronomy,
 University of Victoria (astrowww.phys.uvic.ca).
 
 Programming affiliations with the FreeEOS equation-of-state implementation
 for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
 package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
 Linux Links project (loll.sf.net); and the Linux Brochure Project
 (lbproject.sf.net).
 __
 
 Linux-powered Science
 __


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] link static lib to dll

2010-02-09 Thread Micha Renner
A DLL-library is linked to static library. 
The structure of the project is this:

main-project 
+- Project STATIC
|
+- Project DLL

This works very well.
But if I include the following export part to the project of the DLL...

INSTALL(TARGETS T-DLL EXPORT T-DLLExport 
RUNTIME DESTINATION dll 
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
INSTALL(EXPORT T-DLLExport DESTINATION lib/${T-DLL})

... CMake generates the message: CMake Error: INSTALL(EXPORT
TLIBExport ...) includes target T-DLL which requires target
T-Static that is not in the export set.

This is unexpected. I don't want export the static library because it is
already linked to the DLL and it is used only by the DLL.

Micha




___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Solution groups and sub projects.

2010-02-09 Thread Micha Renner
Am Dienstag, den 09.02.2010, 14:34 +0530 schrieb Surya Kiran Gullapalli:
 Hello all,
 This has been asked for quite a few times with no answer and I'm
 putting the same question again.
 
 
 Do we have the support for solution groups and sub projects with VS
 generators. I'm using CMake-2.8.0 (I could see there's a bug reported
 already, but no progress on that)
 If the feature is not available off the shelf, can we resort to some
 hacks with CMakeLists.txt file ?
 
Did you look here: http://www.itk.org/Bug/view.php?id=3796
May be you can use the patch, I am not sure.

Micha

 
 Thanks,
 Surya
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] link static lib to dll

2010-02-09 Thread Micha Renner
Am Dienstag, den 09.02.2010, 11:34 +0100 schrieb Michael Wild:
 On 9. Feb, 2010, at 11:05 , Micha Renner wrote:
 
  A DLL-library is linked to static library. 
  The structure of the project is this:
  
  main-project 
  +- Project STATIC
  |
  +- Project DLL
  
  This works very well.
  But if I include the following export part to the project of the DLL...
  
  INSTALL(TARGETS T-DLL EXPORT T-DLLExport 
  RUNTIME DESTINATION dll 
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib)
  INSTALL(EXPORT T-DLLExport DESTINATION lib/${T-DLL})
  
  ... CMake generates the message: CMake Error: INSTALL(EXPORT
  TLIBExport ...) includes target T-DLL which requires target
  T-Static that is not in the export set.
  
  This is unexpected. I don't want export the static library because it is
  already linked to the DLL and it is used only by the DLL.
  
  Micha
 
 But CMake can't know that somebody linking against the DLL won't need the 
 static library. This is because the static library might contain additional 
 symbols which are not used directly by any of the code in the DLL, and thus 
 are not present in there. That's one of the most surprising facts of static 
 linking...
This is true. Now, I understand the default behavior of CMake (Not bad,
CMake of course).  
 
 The solution is to tell CMake explicitly which of the libraries are in the 
 link interface and thus must be also exported using the 
 LINK_INTERFACE_LIBRARIES target property of your DLL. Set it to the list of 
 libraries which appear in the link interface of your library (i.e. NOT the 
 static library you're talking about). But be careful, if you miss any of the 
 real dependencies, all hell might break loose at any time, even far in the 
 future...

Hopeless, I would have never found this solution.
Thank you very much.
Micha



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] export files and FIND_PACKAGE

2010-02-05 Thread Micha Renner
I install a library (TLib) and their export files with these commands:

INSTALL(TARGETS TLib EXPORT TLibX RUNTIME DESTINATION dll
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

INSTALL(EXPORT TLibX NAMESPACE mp_ DESTINATION lib/TLib)
INSTALL(FILES TLib-config.cmake DESTINATION lib/TLib)

To find the library I use:
FIND_PACKAGE(TLib REQUIRED)

This works.

If I exchange TLibX for TLib (first two install commands) , CMake says
during executing FIND_PACKAGE:
Cannot create mp_TLib target, because target already exists. Then it
goes in an endless loop calling FIND_PACKAGE again and again
and crashes sooner or later.

Are their any roles to chose the right export-filenames?

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] export files and FIND_PACKAGE

2010-02-05 Thread Micha Renner
Am Freitag, den 05.02.2010, 09:51 +0100 schrieb Michael Wild:
 
 Hmmm, that appears to be a bug. Anyways, I usually call the EXPORT something 
 like TLibExports or TLibTargets. 

You are right, this is the best solution

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Changing the build-mode

2010-01-29 Thread Micha Renner
Am Donnerstag, den 28.01.2010, 11:40 +0100 schrieb Michael Wild:

 But you'll certainly want to have a look at the CONFIG_POSTFIX target 
 property or the CONFIG_POSTFIX variable for setting a postfix (such as d) 
 depending on the configuration.
 
 Michael
 

Yes! This tip was very helpful and solves a lot of problems.

Thank you very much.

Micha


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Generated files and subdirectories

2009-11-06 Thread Micha Renner
In the FQ Setction there is a excellent example how to handle generated
files in a subdirectory.

The structure is:
mainDirectory (CMakeLists.txt)
+ ADD_SUBDIRECTORY(src1) (generates the file)
|
+ Process the file

This works also for this structure
mainDirectory (CMakeLists.txt)
+ generate the file
|
+ ADD_SUBDIRECTORY(src1) process the file

From this I concluded the following structure should be possible

mainDirectory(CMakeLists.txt)
+ ADD_SUBDIRETCORY(src2) generate the file
|
+ ADD_SUBDIRECTORY(src1) process the file

Unfortunatelly this generates the make error message:
There is no rule to generate the target: Name of the generated
file (Here tm18.c see below)

So really logical is this not.

Greetings
Micha


--
The CMakeLists.txt files

In mainDirectory I have the following CMakeLists.txt file

PROJECT(MainProj)

ADD_SUBDIRECTORY(src2)
ADD_SUBDIRECTORY(src)

In src2 the CMakeLists.txt file looks like this:

PROJECT(T)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
CMAKE_POLICY(VERSION 2.6)

ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/tm18.c
COMMAND ${CMAKE_BINARY_DIR}/generator tm18
DEPENDS ${CMAKE_SOURCE_DIR}/src/tm
COMMENT ...run)
ADD_CUSTOM_TARGET(targetAdd ALL DEPENDS ${CMAKE_BINARY_DIR}/tm18.c)

and in src2 I have the following CMakeLists.txt file

PROJECT(Tm2)
SET(_targetname ULS)
SET(_src CTest.c ${CMAKE_BINARY_DIR}/tm18.c)

ADD_EXECUTABLE(${_targetname} ${_src})

SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/tm18.c PROPERTIES
GENERATED 1)

TARGET_LINK_LIBRARIES(${_targetname} ${GLIB_LIBRARY})
ADD_DEPENDENCIES(${_targetname} targetAdd)



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] PKG_SEARCH_MODULE

2009-10-26 Thread Micha Renner
Recently, someone ask for PKG_SEARCH_MODULE

At first, I thought simple flag is flag:

PROJECT(MiG)
INCLUDE (FindPkgConfig)
# For GTK
PKG_SEARCH_MODULE(GTK REQUIRED gtk+-2.0)
SET(_targetname ULS)
SET(_src CTest.c)

ADD_EXECUTABLE(${_targetname} ${_src})
SET_TARGET_PROPERTIES(${_targetname} 
PROPERTIES COMPILE_FLAGS ${GTK_CFLAGS}
LINK_FLAGS ${GTK_LDFLAGS})

Alas, in this case SET_TARGET_PROPERTIES is not practical.

For the header file I can use

INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS})
or 
ADD_DEFINITIONS(${GTK_CFLAGS})

The problem is how to link the libraries.

If I assume that all needed libraries start with lib, are in the same
location and have the suffix .so, I could write something like this:

FOREACH(_libname ${GTK_LIBRARIES})
LIST(APPEND NEW_GTK_LIBRARIES
${GTK_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${_libname}${CMAKE_SHARED_LIBRARY_SUFFIX})
ENDFOREACH(_libname)

TARGET_LINK_LIBRARIES(${_targetname} ${NEW_GTK_LIBRARIES})

Of course my assumptions are not always true.

So what is the best and practical way to link the libraries with the
data of PKG_SEARCH_MODULE.

Greetings

Micha




___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake with Qt (plus pkg-config)

2009-10-22 Thread Micha Renner
Okay, we are at the very beginning.

# require at least cmake 2.6
 
project(qlom)   # Should be the first command

cmake_minimum_required(VERSION 2.6 FATAL_ERROR )

 
# Maybe this adds support for moc
# if it is part of Qt 

# This should deliver QT_INCLUDE_DIR and QT_LIBRARIES see the doco (I
don't use QT)
find_package(Qt4 REQUIRED)

include_directories(${QT_INCLUDE_DIR})
 
# No! target_link_libraries($(QT_LIBRARIES))
# No! Or this?: link_directories(${QT4_LIB_DIR})
# Read the documentation
 
# No you don't need pkg-config
# find_package(PkgConfig)
# pkg_check_modules(DEPS glom-1.12 QtGui)
 
SET(QLOM_SOURCES
src/qlom.cc
src/main_window.cc
src/main_window.h
src/glom_model.cc
src/glom_model.h
src/connection_dialog.cc
src/connection_dialog.h
src/glom_layout_model.cc
src/glom_layout_model.h
src/open_sqlite.cc
src/open_sqlite.h
src/utils.cc
src/utils.h)
 
add_executable(qlom ${QLOM_SOURCES})

TARGET_LINK_LIBRARIES(qlom ${QT_LIBRARIES})

That's it.


Greetings
Micha





Am Donnerstag, den 22.10.2009, 12:15 +0200 schrieb Murray Cumming:
 I'm trying to use CMake for the first time, as an experiment, with
 little a Qt-based project. It also uses an additional library, via
 pkg-config.
 
 So far Qt's include files don't seem to be found, and I wonder how I can
 cause moc to be used to generate some of the .cc files.
 
 Here's what I have so far:
 http://github.com/murraycu/qlom/blob/qlom_cmake/CMakeLists.txt
 based on the many and varied google results.
 
 Can anyone give me some clues?
 
 

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


  1   2   >