[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] EXECUTABLE_OUTPUT_PATH on Mac OS X
From:       Brad King <brad.king () kitware ! com>
Date:       2004-12-09 1:17:10
Message-ID: 41B7A796.30908 () kitware ! com
[Download RAW message or body]

Karl Merkley wrote:
> I have a directory structure that looks like this
> 
>           top-level
> exe dir1 dir2 dir3
> 
> In the exe directory I have the main.cpp and it links to libraries 
> created in all the other sub directories.  The CMakeLists.txt in the exe 
> directory I set the the output path to
> SET(EXECUTABLE_OUTPUT_PATH ${proj_BINARY_DIR})
> 
> and add the executable as follows
> IF(APPLE)
>    SET(GUI_EXECUTABLE MACOSX_BUNDLE)
> ENDIF(APPLE)
> 
> ADD_EXECUTABLE(proj ${GUI_EXECUTABLE} ${PROJ_APP_SRCS} 
> ${EXTRA_PROJ_APP_SRCS} ${PROJ_APP_HEADERS})
> 
> This works and creates the executable in the top-level directory on 
> Windows, Linux, and several flavors of UNIX.
> 
> The Mac however is giving me some problems.
> 
> The target generated in the Makefile is
> TARGETS =  \
> /Users/karl/build_proj/proj
> 
> but the build line in the generated Makefile is
> /Users/karl/build_proj/proj.app/Contents/MacOS/proj: some list of 
> dependencies
> 
> When the Makefile is executed it attempts to build TARGET but the 
> requested target does not exist in the Makefile.  I can cd to the exe 
> directory and do a make 
> /Users/karl/build_proj/proj.app/Contents/MacOS/proj and the final build 
> step works correctly.
> 
> Does anyone have any suggestions for making this work?

This looks like a bug.  Please try to reproduce it in a small test case 
and report the bug here:

http://www.cmake.org/Bug

You can include the small test case as an attachment once the bug report 
is created.

Thanks,
-Brad

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic