[CMake] CPack install commands -- CPACK_NSIS_EXTRA_INSTALL_COMMANDS

2006-09-27 Thread Bill Katz

Hi,
I'm using CPack to generate a Windows installer for a simulation
package. The code was compiled using VS 2005, and I'd like NSIS to
execute the Microsoft-supplied vcredist_x86.exe during install. How
would I do this?

I noticed the CPACK_NSIS_EXTRA_INSTALL_COMMANDS variable, but I
haven't found any documentation on its use.
Thanks for any help.
-Bill
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack install commands -- CPACK_NSIS_EXTRA_INSTALL_COMMANDS

2006-09-28 Thread Bill Katz

Thanks very much, David. The ExecWait command and format worked, minus
the /(un)install flags.
Best,
Bill


On 9/28/06, David Cole <[EMAIL PROTECTED]> wrote:

Something like this in your CMakeLists.txt prior to "INCLUDE(CPack)":

  IF(WIN32)
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
  ExecWait '\\\"$INSTDIRvcredist_x86.exe\\\" /install'
")

SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
  ExecWait '\\\"$INSTDIRvcredist_x86.exe\\\" /uninstall'
")
  ENDIF(WIN32)

You'll have to read up on vcredist_x86.exe, though. I just made up
"/install" and "/uninstall"... They may or may not even support
/uninstall for that package, I don't know...

You'll notice that the escaped versions of these lines show up in the
NSIS input file
"${CMAKE_BINARY_DIR}/_CPack_Packages/win32/NSIS/project.nsi"... The
double backslashes are ugly, but the string goes through two configures,
so they're necessary with CMake 2.4.

The example assumes that you've first installed the exe in the root
$INSTDIR of the NSIS installation. If you can figure out the correct NSI
incantation to run it directly without installing it or to run it from
CD or network location, that should work too. I'm not an NSI expert by
any means, just enough to have figured out how to pass a simple ExecWait
call through like so...

Hope this helps,
David


Bill Katz wrote:

> Hi,
> I'm using CPack to generate a Windows installer for a simulation
> package. The code was compiled using VS 2005, and I'd like NSIS to
> execute the Microsoft-supplied vcredist_x86.exe during install. How
> would I do this?
>
> I noticed the CPACK_NSIS_EXTRA_INSTALL_COMMANDS variable, but I
> haven't found any documentation on its use.
> Thanks for any help.
> -Bill
> ___
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CPack - installing non .exe and question on some variables

2006-10-23 Thread Bill Katz

Hello,
I'd like to install a .bat file (or a simple readme) instead of a .exe
and have it listed in the start menu. It looks like the
CPACK_PACKAGE_EXECUTABLES appends .exe. Is there a way to package
non-exe starting files?  And what does CPACK_NSIS_INSTALLED_ICON_NAME
do? I wasn't able to tell from the example on
http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
Thanks for any help,
Bill
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Question on ExternalProject_Add and different dependency directives

2012-12-07 Thread Bill Katz
Hi,

I love the ExternalProject_Add module and use it extensively in an
open-source build system I'm developing for our apps:

http://github.com/janelia-flyem/buildem

The idea is to make a build environment from source, using cached tarballs,
and allow different version dependency graphs as commits in a git
repository of all build modules.  I don't use FindPackage because we want
to know exactly how dependencies are built and modify parameters for some
of them.  Also, just about everything above the language compiler level
gets built into one build prefix directory.  The goal is to run at most two
"cmake..; make..." commands and have the system completely download and
build all necessary components from archived source.

In looking through the CMake message boards, I think I understand that
external projects aren't real targets but can still be used as
dependencies.  As long as I use the DEPENDS in ExternalProject_Add(), the
dependencies seem to work as expected.  However, I've run into an issue
where I'm using add_dependencies(EP1) where EP1 is an external project and
it's being rebuilt regardless of whether it was built already.

So I was hoping to get clarification on the different ways of specifying
dependencies and what happens after those statements.

DEPENDS in ExternalProject_Add lets you specify other external project
targets.  The dependencies only get downloaded and built once.  Question:
how does ExternalProject_Add determine when an external project needs to go
through its stages again?  I read that git repo external projects are
always pulled unless you explicitly use an empty UPDATE_COMMAND.

If two different CMakeLists.txt include the same cmake file with a fixed
ExternalProject_Add's PREFIX directory, could there be some thrashing going
on?

add_dependencies(myexe EP1 EP2...) seems to work efficiently for most of my
modules (i.e, doesn't try to download, configure, etc, if it's done so
already), but for some more complicated ones, the external projects and its
dependencies always get rebuilt.  I'm assuming there's something in my
modules that forces rebuilding of an external project even if its built.
 In the suspect CMakeLists.txt for external project EP1 that I own, I have
a number of commands of the form:

project(EP1)

add_library(EP1 ${SOURCES})
add_dependencies(EP1 ep3 ep4)

add_custom_command(TARGET EP1
 DEPENDS EP2 EP3
 COMMAND dostuff)

add_custom_command(OUTPUT some_constants.h ${more_autogen_include_files}
  DEPENDS thrift_EP
  COMMAND generate_includes)

add_executable(foo foo.cpp)
target_link_libraries(foo EP1 ${foolibs})

set_source_files_properties(somestuff.cpp
   PROPERTIES OBJECT_DEPENDS ${generated_file_dir}/some_constants.h)


I think there's either a deficiency in my understanding and/or one of the
above is forcing rebuilds.  Any help would be appreciated in figuring out
where I'm going wrong.

Thanks,
Bill
--

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