[Cmake] Combining Separate CMake Projects
Chris Scharver
scharver at evl.uic.edu
Mon Jun 28 16:10:41 EDT 2004
On Jun 28, 2004, at 10:41 AM, Brad King wrote:
>> I did try this approach, and it worked perfectly. There is one extra
>> directory layer, so maybe I should finally add a CUSTOM_COMMAND to
>> install the resulting executable into the original source directory.
>> That way, the end user doesn't have to care about how many directory
>> layers are in place during the build as long as the executable is in
>> the correct location relative to the data files. CUSTOM_COMMAND is
>> still the only way to perform a target install for Visual Studio
>> workspaces, correct?
>
> There are a couple of choices. You can set LIBRARY_OUTPUT_PATH and
> EXECUTABLE_OUTPUT_PATH to point at somewhere in the build tree (like
> foo-build/bin) and then all executables and libraries will be placed
> there as part of the normal build process. Also, CMake 2.0 has
> support for install targets in windows.
For now, I want to avoid copying all the data files to a new location.
It's a lot easier for now to just place the binaries at the appropriate
place in the source tree. I'm happy to see that INSTALL_TARGETS works
on Windows now! I am encountering a strange issue with
CMAKE_INSTALL_PREFIX now. In my top-level CMakeLists.txt, I have:
MARK_AS_ADVANCED(CLEAR CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX ${project_SOURCE_DIR})
When I start the CMake GUI (2.0-2), this variable appears as
/usr/local. However, when I build the install project in Visual Studio,
the targets are installed into the correct directory! The
CMakeCache.txt still contains /usr/local, and if I uncomment the lines
above, the targets are installed into C:/usr/local. Something doesn't
seem to match between the GUI and the interpreted value during the
install. Is there some way that I can set the CMAKE_INSTALL_PREFIX in
CMakeLists.txt and have the GUI reflect the updated value?
Chris
--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002 FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>
More information about the Cmake
mailing list